Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Docker hub dependency in tests #270

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/data/b_p_w_vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
vars:
ansible_bender:
verbose_layer_names: true
base_image: "docker.io/library/python:3-alpine"
base_image: "quay.io/biocontainers/python:3"

working_container:
volumes:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/p_w_vars_files.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- hosts: all
vars:
ansible_bender:
base_image: "docker.io/library/python:3-alpine"
base_image: "quay.io/biocontainers/python:3"
target_image:
name: with-vars-files
labels:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/pb_wrong_type.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- hosts: all
vars:
ansible_bender:
base_image: "docker.io/library/python:3-alpine"
base_image: "quay.io/biocontainers/python:3"
target_image: my-image-name
tasks:
- copy:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/playbook_with_unknown_keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: unknown_key

verbose_layer_names: true
base_image: "docker.io/library/python:3-alpine"
base_image: "quay.io/biocontainers/python:3"

working_container:
volumes:
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_inspect_cmd(tmpdir, target_image):
ab(cmd, str(tmpdir))
out = ab(["inspect"], str(tmpdir), return_output=True)

assert "base_image: docker.io/library/python:3-alpine" in out
assert "base_image: quay.io/biocontainers/python:3" in out
assert "build_container: " in out
assert "build_finished_time: " in out
assert "build_start_time: " in out
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_basic(tmpdir):
cmd = ["inspect", "--json"]
ab_inspect_data = json.loads(ab(cmd, str(tmpdir), return_output=True))

assert ab_inspect_data["base_image"] == "docker.io/library/python:3-alpine"
assert ab_inspect_data["base_image"] == "quay.io/biocontainers/python:3"
assert ab_inspect_data["build_id"] == "1"
assert ab_inspect_data['build_volumes'] == [f'{data_dir}:/src:Z']
assert ab_inspect_data['builder_name'] == "buildah"
Expand Down Expand Up @@ -65,7 +65,7 @@ def test_with_vars_files(tmpdir):
cmd = ["inspect", "--json"]
ab_inspect_data = json.loads(ab(cmd, str(tmpdir), return_output=True))

assert ab_inspect_data["base_image"] == "docker.io/library/python:3-alpine"
assert ab_inspect_data["base_image"] == "quay.io/biocontainers/python:3"
assert ab_inspect_data["build_id"] == "1"
assert ab_inspect_data['builder_name'] == "buildah"
assert len(ab_inspect_data['layers']) == 3
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def test_pb_with_role(build, application):

@pytest.mark.parametrize("image_name,interpreter", [
("registry.fedoraproject.org/fedora:35", "/usr/bin/python3"),
("docker.io/library/python:2.7-alpine", "/usr/local/bin/python2"),
("quay.io/biocontainers/python:2.7", "/usr/local/bin/python2"),
("registry.access.redhat.com/ubi8/ubi:8.2", "/usr/libexec/platform-python")
])
def test_cache_python_interpreter(application, build, image_name, interpreter):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_buildah.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
("registry.fedoraproject.org/fedora:33", True),
("registry.access.redhat.com/ubi8/python-38", True),
(base_image, True),
("docker.io/library/busybox", False),
("quay.io/quay/busybox", False),
])
def test_find_py_intrprtr_in_fedora_image(image_name, found):
build = Build()
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
def test_expand_pb_vars():
p = PbVarsParser(b_p_w_vars_path)
data = p.expand_pb_vars()
assert data["base_image"] == "docker.io/library/python:3-alpine"
assert data["base_image"] == "quay.io/biocontainers/python:3"
assert data["verbose_layer_names"]
playbook_dir = os.path.dirname(b_p_w_vars_path)
assert data["working_container"]["volumes"] == [f"{playbook_dir}:/src:Z"]
Expand Down
2 changes: 1 addition & 1 deletion tests/spellbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import_playbook_basic = os.path.join(data_dir, "import_playbook_basic.yaml")
import_playbook_recursive = os.path.join(data_dir, "import_playbook_recursive.yaml")

base_image = "docker.io/library/python:3-alpine"
base_image = "quay.io/biocontainers/python:3"


C7_AP_VER_OUT = """\
Expand Down