mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix amazon linux 2023 tests
This commit is contained in:
parent
324a1519c1
commit
1c312ca9c0
3 changed files with 9 additions and 7 deletions
|
@ -14,7 +14,7 @@ def pkg_name(salt_call_cli, grains):
|
|||
elif grains["os_family"] == "RedHat":
|
||||
if grains["os"] == "VMware Photon OS":
|
||||
return "snoopy"
|
||||
elif grains["os"] == "Amazon":
|
||||
elif grains["osfinger"] == "Amazon Linux-2023":
|
||||
return "dnf-utils"
|
||||
return "units"
|
||||
elif grains["os_family"] == "Debian":
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import os.path
|
||||
import pathlib
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
|
@ -117,7 +118,7 @@ def test_compare_pkg_versions_redhat_rc(version, install_salt):
|
|||
if not pkg:
|
||||
pytest.skip("Not testing rpm packages")
|
||||
pkg = pkg[0].split("/")[-1]
|
||||
if "rc" not in pkg:
|
||||
if not re.search(r"rc[0-9]", pkg):
|
||||
pytest.skip("Not testing an RC package")
|
||||
assert "~" in pkg
|
||||
comp_pkg = pkg.split("~")[0]
|
||||
|
|
|
@ -237,12 +237,13 @@ def test_pkgrepo_with_comments(pkgrepo, pkgrepo_with_comments_name, subtests):
|
|||
|
||||
@pytest.fixture
|
||||
def copr_pkgrepo_with_comments_name(pkgrepo, grains):
|
||||
if (
|
||||
grains["osfinger"] in ("CentOS Linux-7", "Amazon Linux-2")
|
||||
or grains["os"] == "VMware Photon OS"
|
||||
):
|
||||
if grains["osfinger"] in ("CentOS Linux-7") or grains["os"] == "VMware Photon OS":
|
||||
pytest.skip("copr plugin not installed on {} CI".format(grains["osfinger"]))
|
||||
if grains["os"] in ("CentOS Stream", "AlmaLinux") and grains["osmajorrelease"] == 9:
|
||||
if (
|
||||
grains["os"] in ("CentOS Stream", "AlmaLinux")
|
||||
and grains["osmajorrelease"] == 9
|
||||
or grains["osfinger"] == "Amazon Linux-2023"
|
||||
):
|
||||
pytest.skip("No repo for {} in test COPR yet".format(grains["osfinger"]))
|
||||
pkgrepo_name = "hello-copr"
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue