spec/inputs/cloudwatch_spec.rb in logstash-input-cloudwatch-2.2.3 vs spec/inputs/cloudwatch_spec.rb in logstash-input-cloudwatch-2.2.4
- old
+ new
@@ -49,9 +49,22 @@
expect { subject.register }.to_not raise_error
end
end
end
+ describe 'shutdown' do
+ let(:metrics) { double("metrics") }
+ let(:config) { super().merge('namespace' => 'AWS/EC2') }
+
+ before do
+ allow(subject).to receive(:metrics_for).and_return(metrics)
+ allow(metrics).to receive(:count).and_return(1)
+ allow(metrics).to receive(:each).and_return(['DiskWriteBytes'])
+ end
+
+ it_behaves_like "an interruptible input plugin"
+ end
+
describe '#register' do
context "EC2 namespace" do
let(:config) { super().merge('namespace' => 'AWS/EC2') }
it_behaves_like 'it does not require filters'