def test_start_container_uses_tagged_image_if_it_exists(self): self.client.build("tests/fixtures/simple-dockerfile", tag="figtest_test") service = Service( name="test", client=self.client, build="this/does/not/exist/and/will/throw/error", project="figtest" ) container = service.start_container() container.wait() self.assertIn("success", container.logs())
def test_start_container_uses_tagged_image_if_it_exists(self): self.client.build('tests/fixtures/simple-dockerfile', tag='default_test') service = Service( name='test', client=self.client, build='this/does/not/exist/and/will/throw/error', ) container = service.start_container() container.wait() self.assertIn('success', container.logs())
def test_start_container_builds_images(self): service = Service( name='test', client=self.client, build='tests/fixtures/simple-dockerfile', ) container = service.start_container() container.wait() self.assertIn('success', container.logs()) self.assertEqual(len(self.client.images(name='default_test')), 1)
def test_start_container_builds_images(self): service = Service( name='test', client=self.client, build='tests/fixtures/simple-dockerfile', project='figtest', ) container = service.start_container() container.wait() self.assertIn('success', container.logs()) self.assertEqual(len(self.client.images(name='figtest_test')), 1)
def test_start_container_uses_tagged_image_if_it_exists(self): self.client.build('tests/fixtures/simple-dockerfile', tag='figtest_test') service = Service( name='test', client=self.client, build='this/does/not/exist/and/will/throw/error', project='figtest', ) container = service.start_container() container.wait() self.assertIn('success', container.logs())
def test_start_container_builds_images(self): service = Service(name="test", client=self.client, build="tests/fixtures/simple-dockerfile", project="figtest") container = service.start_container() container.wait() self.assertIn("success", container.logs()) self.assertEqual(len(self.client.images(name="figtest_test")), 1)