Tag built images and use them when starting
A basic measure to get round the fact that adding isn't cached. Once Docker supports cached adds, this is probably redundant.
This commit is contained in:
parent
76b6354173
commit
507940535f
2 changed files with 26 additions and 2 deletions
|
|
@ -113,6 +113,18 @@ class ServiceTest(DockerClientTestCase):
|
|||
container = service.start()
|
||||
container.wait()
|
||||
self.assertIn('success', container.logs())
|
||||
self.assertEqual(len(self.client.images(name='default_test')), 1)
|
||||
|
||||
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.wait()
|
||||
self.assertIn('success', container.logs())
|
||||
|
||||
def test_start_container_creates_ports(self):
|
||||
service = self.create_service('web', ports=[8000])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue