Skip to content

Commit 4df6bc0

Browse files
committed
Add initial testing for the 16.1 base containers
1 parent 1dd6506 commit 4df6bc0

File tree

5 files changed

+29
-11
lines changed

5 files changed

+29
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ jobs:
206206
os_version: "16.0"
207207
- toxenv: repository
208208
os_version: "16.0"
209+
- toxenv: all
210+
os_version: "16.1"
211+
- toxenv: base
212+
os_version: "16.1"
213+
- toxenv: minimal
214+
os_version: "16.1"
215+
- toxenv: metadata
216+
os_version: "16.1"
209217
- toxenv: base
210218
testing_target: factory-totest
211219
os_version: "tumbleweed"

bci_tester/data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"15.6",
4343
"15.7",
4444
"16.0",
45+
"16.1",
4546
"tumbleweed",
4647
)
4748

@@ -73,7 +74,7 @@
7374
_DEFAULT_NONBASE_OS_VERSIONS = ("15.7", "16.0", "tumbleweed")
7475

7576
# Test base containers by default for these versions
76-
_DEFAULT_BASE_OS_VERSIONS = ("15.7", "16.0", "tumbleweed")
77+
_DEFAULT_BASE_OS_VERSIONS = ("15.7", "16.0", "16.1", "tumbleweed")
7778

7879
# List the released versions of SLE, used for supportability and EULA tests
7980
RELEASED_SLE_VERSIONS = (
@@ -181,7 +182,7 @@
181182
if BASEURL.endswith("/"):
182183
BASEURL = BASEURL[:-1]
183184
else:
184-
if OS_VERSION in ("tumbleweed", "16.0"):
185+
if OS_VERSION in ("tumbleweed", "16.0", "16.1"):
185186
DISTNAME = OS_VERSION
186187
else:
187188
DISTNAME = f"sle-{OS_MAJOR_VERSION}-sp{OS_SP_VERSION}"

tests/test_all.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def test_product(auto_container):
166166

167167

168168
@pytest.mark.skipif(
169-
OS_VERSION in ("15.4", "15.5", "15.6", "tumbleweed"),
169+
OS_VERSION in ("15.4", "15.5", "15.6", "tumbleweed")
170+
or OS_VERSION not in RELEASED_SLE_VERSIONS,
170171
reason="suse trademark only available in certain SLE versions",
171172
)
172173
def test_suse_trademark(auto_container):
@@ -429,6 +430,10 @@ def test_no_orphaned_packages(container_per_test: ContainerData) -> None:
429430
assert not orphaned_packages.difference(known_orphaned_packages)
430431

431432

433+
@pytest.mark.skipif(
434+
OS_VERSION not in ALLOWED_BCI_REPO_OS_VERSIONS,
435+
reason="no included BCI repository - can't test zypper verify",
436+
)
432437
@pytest.mark.parametrize(
433438
"container", CONTAINERS_WITH_ZYPPER_AS_ROOT, indirect=True
434439
)

tests/test_base.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
from pytest_container.container import container_and_marks_from_pytest_param
1414
from pytest_container.runtime import LOCALHOST
1515

16+
from bci_tester.data import ALLOWED_BCI_REPO_OS_VERSIONS
1617
from bci_tester.data import BASE_CONTAINER
1718
from bci_tester.data import BASE_FIPS_CONTAINERS
1819
from bci_tester.data import LTSS_BASE_CONTAINERS
1920
from bci_tester.data import LTSS_BASE_FIPS_CONTAINERS
2021
from bci_tester.data import OS_VERSION
22+
from bci_tester.data import RELEASED_LTSS_VERSIONS
2123
from bci_tester.data import TARGET
2224
from bci_tester.data import ZYPP_CREDENTIALS_DIR
2325
from bci_tester.fips import ALL_DIGESTS
@@ -300,6 +302,11 @@ def test_all_openssl_hashes_known(auto_container):
300302

301303

302304
@pytest.mark.parametrize("container_per_test", [DIND_CONTAINER], indirect=True)
305+
@pytest.mark.skipif(
306+
OS_VERSION not in RELEASED_LTSS_VERSIONS
307+
or OS_VERSION not in ALLOWED_BCI_REPO_OS_VERSIONS,
308+
reason="No repo available to install docker",
309+
)
303310
@pytest.mark.skipif(
304311
not DOCKER_SELECTED,
305312
reason="Docker in docker can only be tested when using the docker runtime",
@@ -312,11 +319,8 @@ def test_dind(container_per_test):
312319
:py:const:`DIND_CONTAINER`).
313320
314321
"""
315-
container_per_test.connection.run_expect([0], "zypper -n in docker")
316-
container_per_test.connection.run_expect([0], "docker ps")
317-
res = container_per_test.connection.run_expect(
318-
[0],
319-
"docker run --rm registry.opensuse.org/opensuse/tumbleweed:latest "
320-
"/usr/bin/ls",
322+
container_per_test.connection.check_output("zypper -n in docker")
323+
container_per_test.connection.check_output("docker ps")
324+
assert "res" in container_per_test.connection.check_output(
325+
"docker run --rm registry.suse.com/bci/bci-busybox:latest /usr/bin/ls",
321326
)
322-
assert "etc" in res.stdout

tests/test_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def test_disturl(
670670
"obs://build.suse.de/SUSE:SLFO:Products:PublicCloud:Toolchain:2025"
671671
in disturl
672672
)
673-
elif OS_VERSION == "16.0":
673+
elif OS_VERSION.startswith("16."):
674674
if baseurl.netloc == "registry.opensuse.org":
675675
assert (
676676
f"obs://build.opensuse.org/devel:BCI:16.{OS_SP_VERSION}"

0 commit comments

Comments
 (0)