Skip to content

Commit 4cdce68

Browse files
authored
Fix the tests failing on AlmaLinux 10 and other clones
* Fix the package manager related tests failing with AlmaLinux 10 * Fix network test failing on NetworkManager only systems * Align test conditions with upstream
1 parent d0ab0bf commit 4cdce68

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

tests/integration/states/test_network.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ def setUp(self):
2525
"Network state only supported on RedHat and Debian based systems."
2626
"The network state does not currently work on VMware Photon OS."
2727
)
28+
if (
29+
os_family == "RedHat"
30+
and self.run_function("grains.get", ["osmajorrelease"]) >= 10
31+
):
32+
self.skipTest(
33+
"Network state doesn't fully support NetworkManager only systems."
34+
)
2835

2936
@pytest.mark.slow_test
3037
def test_managed(self):

tests/pytests/functional/states/pkgrepo/test_centos.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ def copr_pkgrepo_with_comments_name(pkgrepo, grains):
242242
or grains["os"] == "VMware Photon OS"
243243
):
244244
pytest.skip("copr plugin not installed on {} CI".format(grains["osfinger"]))
245-
if grains["os"] in ("CentOS Stream", "AlmaLinux") and grains["osmajorrelease"] == 9:
245+
if (
246+
grains["os"] in ("CentOS Stream", "AlmaLinux", "Rocky")
247+
and grains["osmajorrelease"] >= 9
248+
or grains["osfinger"] == "Amazon Linux-2023"
249+
):
246250
pytest.skip("No repo for {} in test COPR yet".format(grains["osfinger"]))
247251
pkgrepo_name = "hello-copr"
248252
try:

tests/pytests/functional/states/test_pkg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def PKG_TARGETS(grains):
5252
if grains["os"] == "VMware Photon OS":
5353
_PKG_TARGETS = ["wget", "zsh-html"]
5454
elif (
55-
grains["os"] in ("CentOS Stream", "AlmaLinux")
56-
and grains["osmajorrelease"] == 9
55+
grains["os"] in ("CentOS Stream", "Rocky", "AlmaLinux")
56+
and grains["osmajorrelease"] >= 9
5757
):
5858
_PKG_TARGETS = ["units", "zsh"]
5959
else:

0 commit comments

Comments
 (0)