Skip to content

Commit

Permalink
additional review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller committed Jul 7, 2023
1 parent 72886e0 commit e17af7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
10 changes: 5 additions & 5 deletions bci_tester/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@
BASEURL = BASEURL[:-1]
else:
if OS_VERSION == "tumbleweed":
distname = "tumbleweed"
DISTNAME = "tumbleweed"
else:
distname = f"sle-{OS_MAJOR_VERSION}-sp{OS_SP_VERSION}"
DISTNAME = f"sle-{OS_MAJOR_VERSION}-sp{OS_SP_VERSION}"
BASEURL = {
"obs": f"registry.opensuse.org/devel/bci/{distname}",
"ibs": f"registry.suse.de/suse/{distname}/update/bci",
"obs": f"registry.opensuse.org/devel/bci/{DISTNAME}",
"ibs": f"registry.suse.de/suse/{DISTNAME}/update/bci",
"dso": "registry1.dso.mil/ironbank/suse",
"ibs-cr": f"registry.suse.de/suse/{distname}/update/cr/totest",
"ibs-cr": f"registry.suse.de/suse/{DISTNAME}/update/cr/totest",
}[TARGET]


Expand Down
26 changes: 10 additions & 16 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
URL = "https://www.suse.com/products/server/"


SKIP_IF_TW_MARK = pytest.mark.skipif(
OS_VERSION == "tumbleweed",
reason="no supportlevel labels on openSUSE containers",
)


def _get_container_label_prefix(
container_name: str, container_type: ImageType
) -> str:
Expand Down Expand Up @@ -338,10 +344,7 @@ def test_disturl_can_be_checked_out(
check_output(["osc", "co", disturl], cwd=tmp_path)


@pytest.mark.skipif(
OS_VERSION == "tumbleweed",
reason="no image-type labels on openSUSE containers",
)
@SKIP_IF_TW_MARK
@pytest.mark.parametrize(
"container,container_type",
[
Expand Down Expand Up @@ -370,10 +373,7 @@ def test_image_type_label(
), "sle-bci images must be marked as such"


@pytest.mark.skipif(
OS_VERSION == "tumbleweed",
reason="no supportlevel labels on openSUSE containers",
)
@SKIP_IF_TW_MARK
@pytest.mark.parametrize(
"container",
[
Expand All @@ -394,10 +394,7 @@ def test_techpreview_label(container: ContainerData):
), "images must be marked as techpreview"


@pytest.mark.skipif(
OS_VERSION == "tumbleweed",
reason="no supportlevel labels on openSUSE containers",
)
@SKIP_IF_TW_MARK
@pytest.mark.parametrize(
"container",
[cont for cont in ACC_CONTAINERS],
Expand All @@ -413,10 +410,7 @@ def test_acc_label(container: ContainerData):
), "acc images must be marked as acc"


@pytest.mark.skipif(
OS_VERSION == "tumbleweed",
reason="no supportlevel labels on openSUSE containers",
)
@SKIP_IF_TW_MARK
@pytest.mark.parametrize("container", L3_CONTAINERS, indirect=True)
def test_l3_label(container: ContainerData):
"""Check that containers under L3 support have the label
Expand Down

0 comments on commit e17af7b

Please sign in to comment.