Update acceptance test for image matching

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2018-09-20 15:37:42 -07:00
parent 7d0fb7d3f3
commit 834acca497
7 changed files with 15 additions and 27 deletions

View File

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

View File

@ -0,0 +1,2 @@
FROM busybox:latest
RUN touch /foo

View File

@ -1,2 +0,0 @@
FROM busybox:latest
RUN touch /same-image

View File

@ -1,6 +0,0 @@
version: "2.2"
services:
test:
image: busybox:dev
build: .

View File

@ -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: .

View File

@ -1,2 +0,0 @@
FROM busybox:latest
RUN touch /same-image

View File

@ -1,6 +0,0 @@
version: "2.2"
services:
test:
image: busybox:dev
build: .