Esempio n. 1
0
 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())
Esempio n. 2
0
 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())
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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())
Esempio n. 6
0
 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)