Write integration test for 'auto_start' behaviour

Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
This commit is contained in:
d11wtq 2014-06-07 13:19:28 +00:00 committed by Chris Corbyn
parent 0c12db06ec
commit dfc74e2a77
1 changed files with 15 additions and 0 deletions

View File

@ -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)