From b26169b7b93f3e73f0492b8273c2d43e62753c40 Mon Sep 17 00:00:00 2001 From: Aaron Virshup Date: Fri, 8 Jun 2018 16:11:41 -0700 Subject: [PATCH] Add test for --all ignoring abstract images --- test/data/abstract-steps.yml | 8 ++++++++ test/test_features.py | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test/data/abstract-steps.yml diff --git a/test/data/abstract-steps.yml b/test/data/abstract-steps.yml new file mode 100644 index 0000000..d83ef91 --- /dev/null +++ b/test/data/abstract-steps.yml @@ -0,0 +1,8 @@ +abstract: + build: | + RUN touch /tmp/a + +definite: + FROM: alpine + requires: + - abstract diff --git a/test/test_features.py b/test/test_features.py index e13a4dc..fdeb915 100644 --- a/test/test_features.py +++ b/test/test_features.py @@ -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') \ No newline at end of file + 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') \ No newline at end of file