mirror of https://github.com/docker/compose.git
Update acceptance test for image matching
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
7d0fb7d3f3
commit
834acca497
|
@ -2773,13 +2773,10 @@ class CLITestCase(DockerClientTestCase):
|
|||
|
||||
def test_images_use_service_tag(self):
|
||||
pull_busybox(self.client)
|
||||
self.base_dir = 'tests/fixtures/images-service-tag/dev'
|
||||
self.dispatch(['build'])
|
||||
self.base_dir = 'tests/fixtures/images-service-tag/prod'
|
||||
self.dispatch(['build'])
|
||||
self.base_dir = 'tests/fixtures/images-service-tag'
|
||||
self.dispatch(['up', '-d'])
|
||||
self.dispatch(['up', '-d', '--build'])
|
||||
result = self.dispatch(['images'])
|
||||
self.dispatch(['down'])
|
||||
|
||||
assert 'dev' in result.stdout
|
||||
assert re.search(r'foo1.+test[ \t]+dev', result.stdout) is not None
|
||||
assert re.search(r'foo2.+test[ \t]+prod', result.stdout) is not None
|
||||
assert re.search(r'foo3.+_foo3[ \t]+latest', result.stdout) is not None
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
FROM busybox:latest
|
||||
RUN touch /foo
|
|
@ -1,2 +0,0 @@
|
|||
FROM busybox:latest
|
||||
RUN touch /same-image
|
|
@ -1,6 +0,0 @@
|
|||
version: "2.2"
|
||||
|
||||
services:
|
||||
test:
|
||||
image: busybox:dev
|
||||
build: .
|
|
@ -1,5 +1,10 @@
|
|||
version: "2.2"
|
||||
|
||||
version: "2.4"
|
||||
services:
|
||||
test:
|
||||
image: busybox:dev
|
||||
foo1:
|
||||
build: .
|
||||
image: test:dev
|
||||
foo2:
|
||||
build: .
|
||||
image: test:prod
|
||||
foo3:
|
||||
build: .
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
FROM busybox:latest
|
||||
RUN touch /same-image
|
|
@ -1,6 +0,0 @@
|
|||
version: "2.2"
|
||||
|
||||
services:
|
||||
test:
|
||||
image: busybox:dev
|
||||
build: .
|
Loading…
Reference in New Issue