diff --git a/spec/outputs/kusto_spec.rb b/spec/outputs/kusto_spec.rb index 06fe22d..eba4cb7 100755 --- a/spec/outputs/kusto_spec.rb +++ b/spec/outputs/kusto_spec.rb @@ -21,61 +21,63 @@ } } describe '#register' do - skip 'temporarily disabling all tests' do - it 'allows valid configuration' do - kusto = described_class.new(options) - expect { kusto.register }.not_to raise_error - kusto.close - end + it 'allows valid configuration' do + RSpec.configuration.reporter.message("Running test: allows valid configuration") + kusto = described_class.new(options) + expect { kusto.register }.not_to raise_error + kusto.close + RSpec.configuration.reporter.message("Completed test: allows valid configuration") end end describe '#multi_receive_encoded' do - skip 'temporarily disabling all tests' do - it 'buffers events and flushes based on max_size' do - kusto = described_class.new(options.merge( {'max_size' => 2} )) - kusto.register + it 'buffers events and flushes based on max_size' do + RSpec.configuration.reporter.message("Running test: buffers events and flushes based on max_size") + kusto = described_class.new(options.merge({'max_size' => 2})) + kusto.register - event1 = LogStash::Event.new("message" => "event1") - event2 = LogStash::Event.new("message" => "event2") - event3 = LogStash::Event.new("message" => "event3") + event1 = LogStash::Event.new("message" => "event1") + event2 = LogStash::Event.new("message" => "event2") + event3 = LogStash::Event.new("message" => "event3") - expect(kusto.instance_variable_get(:@buffer)).to receive(:flush).twice.and_call_original + expect(kusto.instance_variable_get(:@buffer)).to receive(:flush).twice.and_call_original - kusto.multi_receive_encoded([[event1, event1.to_json], [event2, event2.to_json]]) - kusto.multi_receive_encoded([[event3, event3.to_json]]) + kusto.multi_receive_encoded([[event1, event1.to_json], [event2, event2.to_json]]) + kusto.multi_receive_encoded([[event3, event3.to_json]]) - kusto.close - end + kusto.close + RSpec.configuration.reporter.message("Completed test: buffers events and flushes based on max_size") + end - it 'flushes events based on max_interval' do - kusto = described_class.new(options.merge( {'max_interval' => 1} )) - kusto.register + it 'flushes events based on max_interval' do + RSpec.configuration.reporter.message("Running test: flushes events based on max_interval") + kusto = described_class.new(options.merge({'max_interval' => 1})) + kusto.register - event1 = LogStash::Event.new("message" => "event1") + event1 = LogStash::Event.new("message" => "event1") - expect(kusto.instance_variable_get(:@buffer)).to receive(:flush).at_least(:once).and_call_original + expect(kusto.instance_variable_get(:@buffer)).to receive(:flush).at_least(:once).and_call_original - kusto.multi_receive_encoded([[event1, event1.to_json]]) + kusto.multi_receive_encoded([[event1, event1.to_json]]) - sleep 2 + sleep 2 - kusto.close - end + kusto.close + RSpec.configuration.reporter.message("Completed test: flushes events based on max_interval") end end describe '#close' do - skip 'temporarily disabling all tests' do - it 'shuts down the buffer and ingestor' do - kusto = described_class.new(options) - kusto.register + it 'shuts down the buffer and ingestor' do + RSpec.configuration.reporter.message("Running test: shuts down the buffer and ingestor") + kusto = described_class.new(options) + kusto.register - expect(kusto.instance_variable_get(:@buffer)).to receive(:shutdown) - expect(kusto.instance_variable_get(:@ingestor)).to receive(:stop) + expect(kusto.instance_variable_get(:@buffer)).to receive(:shutdown) + expect(kusto.instance_variable_get(:@ingestor)).to receive(:stop) - kusto.close - end + kusto.close + RSpec.configuration.reporter.message("Completed test: shuts down the buffer and ingestor") end end end \ No newline at end of file