From 51a383a528141f032171b48bdacba15906a1f586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Mon, 23 Oct 2023 17:15:06 +0200 Subject: [PATCH] Ensure that the branding packages are installed in the containers --- tests/test_all.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/test_all.py b/tests/test_all.py index 431529c5..c14f2578 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -89,6 +89,29 @@ def test_os_release(auto_container): ) +@pytest.mark.skipif( + OS_VERSION in ("15.3", "15.4", "15.5"), + reason="branding packages are known to not be installed", +) +@pytest.mark.parametrize( + "container", + CONTAINERS_WITH_ZYPPER, + indirect=True, +) +def test_branding(container): + """ + check that the :file:`/etc/SUSE-brand` file exists and containers SLE branding + """ + location = "/etc/SUSE-brand" + branding = "SLE" + if OS_VERSION == "tumbleweed": + branding = "openSUSE" + if OS_VERSION in ("basalt", "tumbleweed"): + location = "/usr/etc/SUSE-brand" + assert container.connection.file(location).exists + assert branding in container.connection.file(location).content_string + + def test_product(auto_container): """ check that :file:`/etc/products.d/$BASEPRODUCT.prod` exists and