Skip to content

Commit 19887bc

Browse files
Extend restart_httpd for almalinux8
Change-Id: Ie9f262d142adfc900f683e6fa80929798b543ffd
1 parent aba20a5 commit 19887bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/testlib/common/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -479,13 +479,13 @@ def restart_httpd() -> None:
479479
the beginning of the test. This ensures consistency across distributions.
480480
"""
481481

482-
almalinux_9 = "almalinux-9"
483-
assert almalinux_9 in get_supported_distros(), (
484-
f"{almalinux_9} is not supported anymore. " f"Please adapt the code below."
485-
)
482+
almalinux_prefix = "almalinux"
483+
assert any(
484+
distro for distro in get_supported_distros() if distro.startswith(almalinux_prefix)
485+
), "We dropped support for almalinux, please adapt the code below."
486486

487487
# When executed locally and un-dockerized, DISTRO may not be set
488-
if os.environ.get("DISTRO") == almalinux_9:
488+
if os.environ.get("DISTRO", "").startswith(almalinux_prefix):
489489
run(["httpd", "-k", "restart"], sudo=True)
490490

491491

0 commit comments

Comments
 (0)