From dfc74e2a774f2ed09bc277614da8a92ed8ae452a Mon Sep 17 00:00:00 2001 From: d11wtq Date: Sat, 7 Jun 2014 13:19:28 +0000 Subject: [PATCH] Write integration test for 'auto_start' behaviour Signed-off-by: Chris Corbyn --- tests/integration/project_test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/integration/project_test.py b/tests/integration/project_test.py index fa7e38586..28dab507a 100644 --- a/tests/integration/project_test.py +++ b/tests/integration/project_test.py @@ -59,6 +59,21 @@ class ProjectTest(DockerClientTestCase): project.kill() project.remove_stopped() + def test_project_up_without_auto_start(self): + console = self.create_service('console', auto_start=False) + db = self.create_service('db') + project = Project('figtest', [console, db], self.client) + project.start() + self.assertEqual(len(project.containers()), 0) + + project.up() + self.assertEqual(len(project.containers()), 1) + self.assertEqual(len(db.containers()), 1) + self.assertEqual(len(console.containers()), 0) + + project.kill() + project.remove_stopped() + def test_unscale_after_restart(self): web = self.create_service('web') project = Project('figtest', [web], self.client)