Browse Source

Add an acceptance test to show logs behaves properly for stopped containers.

Signed-off-by: Daniel Nephin <[email protected]>
Daniel Nephin 9 năm trước cách đây
mục cha
commit
4312c93eae
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      tests/acceptance/cli_test.py

+ 9 - 0
tests/acceptance/cli_test.py

@@ -1222,6 +1222,15 @@ class CLITestCase(DockerClientTestCase):
         assert 'test' in result.stdout
         assert 'exited with' not in result.stdout
 
+    def test_logs_on_stopped_containers_exits(self):
+        self.base_dir = 'tests/fixtures/echo-services'
+        self.dispatch(['up'])
+
+        result = self.dispatch(['logs'])
+        assert 'simple' in result.stdout
+        assert 'another' in result.stdout
+        assert 'exited with' not in result.stdout
+
     def test_logs_timestamps(self):
         self.base_dir = 'tests/fixtures/echo-services'
         self.dispatch(['up', '-d'])