Skip to content

Commit

Permalink
Skip manifest test on ancient podman versions
Browse files Browse the repository at this point in the history
It fails with "manifest type not supported"
  • Loading branch information
dirkmueller committed Oct 2, 2024
1 parent ff26543 commit 271c615
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
from bci_tester.data import SPACK_CONTAINERS
from bci_tester.data import TOMCAT_CONTAINERS
from bci_tester.data import ImageType
from bci_tester.runtime_choice import PODMAN_SELECTED

#: The official vendor name
VENDOR = "openSUSE Project" if OS_VERSION == "tumbleweed" else "SUSE LLC"
Expand Down Expand Up @@ -647,6 +648,9 @@ def test_reference(


@SKIP_IF_TW_MARK
@pytest.mark.skipif(
not PODMAN_SELECTED, reason="we only need to test it for one runtime"
)
@pytest.mark.parametrize("container", ALL_CONTAINERS, indirect=True)
def test_oci_base_refs(
container: ContainerData,
Expand Down Expand Up @@ -674,7 +678,9 @@ def test_oci_base_refs(
), "Base image reference is not the expected version"
assert base_digest.startswith("sha256:")

LOCALHOST.run_expect(
[0],
if container_runtime.version.major < 3:
pytest.skip("Podman version too old for checking")

LOCALHOST.check_output(
f"{container_runtime.runner_binary} manifest inspect {base_repository}@{base_digest}",
)

0 comments on commit 271c615

Please sign in to comment.