spec/inputs/elasticsearch_spec.rb in logstash-input-elasticsearch-4.0.2 vs spec/inputs/elasticsearch_spec.rb in logstash-input-elasticsearch-4.0.3
- old
+ new
@@ -61,11 +61,11 @@
}
client = Elasticsearch::Client.new
expect(Elasticsearch::Client).to receive(:new).with(any_args).and_return(client)
expect(client).to receive(:search).with(any_args).and_return(response)
- expect(client).to receive(:scroll).with({ :body => "cXVlcnlUaGVuRmV0Y2g", :scroll=> "1m" }).and_return(scroll_reponse)
+ expect(client).to receive(:scroll).with({ :body => { :scroll_id => "cXVlcnlUaGVuRmV0Y2g" }, :scroll=> "1m" }).and_return(scroll_reponse)
event = input(config) do |pipeline, queue|
queue.pop
end
@@ -112,10 +112,10 @@
let(:client) { Elasticsearch::Client.new }
before do
expect(Elasticsearch::Client).to receive(:new).with(any_args).and_return(client)
expect(client).to receive(:search).with(any_args).and_return(response)
- allow(client).to receive(:scroll).with({ :body => "cXVlcnlUaGVuRmV0Y2g", :scroll => "1m" }).and_return(scroll_reponse)
+ allow(client).to receive(:scroll).with({ :body => {:scroll_id => "cXVlcnlUaGVuRmV0Y2g"}, :scroll => "1m" }).and_return(scroll_reponse)
end
context 'when defining docinfo' do
let(:config_metadata) do
%q[