From e01d1455ea8accde1d1730fc5c119f823c432383 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 28 Oct 2024 11:22:05 +0100 Subject: [PATCH] testmap: Add cockpit ws-container RHEL 8.10 test Introduced in https://github.com/cockpit-project/cockpit/pull/21154 --- lib/testmap.py | 1 + test/test_testmap.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/testmap.py b/lib/testmap.py index 9a876f1215..09f0128c1b 100644 --- a/lib/testmap.py +++ b/lib/testmap.py @@ -54,6 +54,7 @@ def contexts(image: str, *scenarios: Iterable[str], repo: str | None = None) -> *contexts(TEST_OS_DEFAULT, ['firefox'], COCKPIT_SCENARIOS), # no udisks on CoreOS → skip storage *contexts('fedora-coreos', COCKPIT_SCENARIOS - {'storage'}), + *contexts('rhel-8-10', ['ws-container'], COCKPIT_SCENARIOS), *contexts('rhel-9-6', COCKPIT_SCENARIOS), *contexts('rhel-10-0', COCKPIT_SCENARIOS), *contexts('centos-10', COCKPIT_SCENARIOS), diff --git a/test/test_testmap.py b/test/test_testmap.py index ca61f27df6..21f860b403 100644 --- a/test/test_testmap.py +++ b/test/test_testmap.py @@ -82,7 +82,8 @@ def test_cockpit_contexts() -> None: # no three-part scenarios, no scenario-less contexts for context in main_tests: assert context.count("/") == 1, f"malformed context {context}" - assert context.split("/")[1].count("-") in [0, 1], \ + # ws-container is the scenario name, but we want to count it as 1 + assert context.split("/")[1].replace("ws-container", "ws_container").count("-") in [0, 1], \ f"context {context} has unexpected number of scenarios" # standard image with standard scenarios assert "arch/networking" in main_tests