diff --git a/spec/unit/outputs/elasticsearch_spec.rb b/spec/unit/outputs/elasticsearch_spec.rb index 7a71e2e8c..3f74785f2 100644 --- a/spec/unit/outputs/elasticsearch_spec.rb +++ b/spec/unit/outputs/elasticsearch_spec.rb @@ -1475,7 +1475,7 @@ expect( event ).to be_a LogStash::Event expect( event ).to be events.first expect( reason ).to start_with "Could not index event to Elasticsearch. status: #{error_code}, action: [\"index\"" - expect( reason ).to match /_id=>"bar".*"foo"=>"bar".*response:.*"reason"=>"TEST"/ + expect( reason ).to match /_id(?::| ?=>) ?"bar".*"foo" ?=> ?"bar".*response:.*"reason" ?=> ?"TEST"/ method.call(*args) # won't hurt to call LogStash::Util::DummyDeadLetterQueueWriter end.once