Skip to content

Commit

Permalink
Add test for --all ignoring abstract images
Browse files Browse the repository at this point in the history
  • Loading branch information
avirshup committed Jun 8, 2018
1 parent a85c3e0 commit b26169b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test/data/abstract-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
abstract:
build: |
RUN touch /tmp/a
definite:
FROM: alpine
requires:
- abstract
11 changes: 10 additions & 1 deletion test/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,13 @@ def test_explicit_all(alltest):
buildargs = helpers.creates_images('target-buildargs')
def test_build_args(buildargs):
run_docker_make('-f data/build-args.yml --build-arg FILENAME=hello-world.txt target-buildargs')
helpers.assert_file_content('target-buildargs', 'hello-world.txt', 'hello world')
helpers.assert_file_content('target-buildargs', 'hello-world.txt', 'hello world')


abstract_steps = helpers.creates_images('definite', 'abstract')
def test_implicit_all_with_abstract_steps(abstract_steps):
run_docker_make('-f data/abstract-steps.yml --all')
client = helpers.get_client()
client.images.get('definite')
with pytest.raises(docker.errors.ImageNotFound):
client.images.get('abstract')

0 comments on commit b26169b

Please sign in to comment.