Add acceptance test

Signed-off-by: Boris HUISGEN <bhuisgen@hbis.fr>
This commit is contained in:
Boris HUISGEN 2018-07-05 23:33:13 +02:00 committed by Joffrey F
parent a2ec572fdf
commit 1b668973a2
6 changed files with 34 additions and 0 deletions

View File

@ -2770,3 +2770,16 @@ class CLITestCase(DockerClientTestCase):
with pytest.raises(DuplicateOverrideFileFound):
get_project(self.base_dir, [])
self.base_dir = None
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'])
result = self.dispatch(['images'])
self.dispatch(['down'])
assert 'dev' in result.stdout

View File

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

View File

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

View File

@ -0,0 +1,5 @@
version: "2.2"
services:
test:
image: busybox:dev

View File

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

View File

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