Sha256: a1a738856470d7689b013da4b086e75e45557f0b63f956de4f52a5aa73361e7a
Contents?: true
Size: 883 Bytes
Versions: 1
Compression:
Stored size: 883 Bytes
Contents
require 'logstash/devutils/rspec/spec_helper' require 'logstash/outputs/elasticsearch_groom' require 'logstash/codecs/plain' require 'logstash/event' require 'rspec/mocks' describe 'outputs/elasticsearch_groom' do let(:es_accessor) { double 'LogStash::Outputs::EsGroom::EsAccessor' } let(:outputClass) { LogStash::Plugin.lookup("output", "elasticsearch_groom") } before do allow_any_instance_of(LogStash::Outputs::ElasticsearchGroom).to receive(:create_es_accessor).and_return(es_accessor) end it 'should work with defaults' do output = outputClass.new() output.register event = LogStash::Event.new(@timestamp => '2015-04-11T00:00:00') expect(es_accessor).to receive(:matching_indices) .with('logstash-*', 'open') .and_return(['logstash-2015.04.11']) output.receive event end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-output-elasticsearch_groom-0.1.0 | spec/outputs/elasticsearch_groom_spec.rb |