test/test_task.rb in bellows-1.0.12 vs test/test_task.rb in bellows-1.1.1
- old
+ new
@@ -41,6 +41,27 @@
tasks.comment('nova', options={:quiet => true, :cache_file => cache_file.path})
end
+ def test_stream
+
+ sample_config = fixture('config.yaml')
+ Bellows::Util.stubs(:load_configs).returns(YAML::load(sample_config))
+
+ smoke_tests_data = fixture('nova_smoke_tests.json')
+ Bellows::HTTP.stubs(:get).returns(smoke_tests_data)
+
+ cache_file=Tempfile.new('smokestack')
+
+ response = mock()
+ Bellows::HTTP.stubs(:post).returns(response)
+ tasks = Bellows::Tasks.new
+
+ stream_data = fixture('stream.json')
+ Bellows::Gerrit.stubs(:stream_events_cmd).returns("echo '#{stream_data}'")
+
+ tasks.stream(options={:quiet => true})
+
+ end
+
end