浏览代码

Update cli integration test for 'auto_start' behaviour

Signed-off-by: Chris Corbyn <[email protected]>
d11wtq 11 年之前
父节点
当前提交
13a296049b
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 1 0
      tests/fixtures/simple-figfile/fig.yml
  2. 7 0
      tests/integration/cli_test.py

+ 1 - 0
tests/fixtures/simple-figfile/fig.yml

@@ -2,5 +2,6 @@ simple:
   image: ubuntu
   command: /bin/sleep 300
 another:
+  auto_start: false
   image: ubuntu
   command: /bin/sleep 300

+ 7 - 0
tests/integration/cli_test.py

@@ -43,6 +43,13 @@ class CLITestCase(DockerClientTestCase):
         self.assertNotIn('fig_another_1', output)
         self.assertIn('fig_yetanother_1', output)
 
+    def test_up(self):
+        self.command.dispatch(['up', '-d'], None)
+        service = self.command.project.get_service('simple')
+        another = self.command.project.get_service('another')
+        self.assertEqual(len(service.containers()), 1)
+        self.assertEqual(len(another.containers()), 0)
+
     def test_rm(self):
         service = self.command.project.get_service('simple')
         service.create_container()