spec/lib/flapjack/data/event_spec.rb in flapjack-1.2.1 vs spec/lib/flapjack/data/event_spec.rb in flapjack-1.2.2
- old
+ new
@@ -99,11 +99,11 @@
result = Flapjack::Data::Event.next('events', :block => true,
:archive_events => false, :redis => redis)
expect(result).to be_nil
end
- ['type', 'state', 'entity', 'check', 'summary'].each do |required_key|
+ ['type', 'state', 'entity', 'check'].each do |required_key|
it "rejects an event with missing '#{required_key}' key (archiving)" do
bad_event_data = event_data.clone
bad_event_data.delete(required_key)
bad_event_json = bad_event_data.to_json
@@ -166,10 +166,10 @@
:archive_events => false, :redis => redis)
expect(result).to be_nil
end
end
- ['time', 'details', 'perfdata', 'acknowledgement_id', 'duration', 'tags'].each do |optional_key|
+ ['time', 'summary', 'details', 'perfdata', 'acknowledgement_id', 'duration', 'tags'].each do |optional_key|
it "rejects an event with invalid '#{optional_key}' key (archiving)" do
bad_event_data = event_data.clone
bad_event_data[optional_key] = {'hello' => 'there'}
bad_event_json = bad_event_data.to_json
expect(redis).to receive(:brpoplpush).