Merge pull request #66529 from s0undt3ch/hotfix/merge-forward-into-3007.x

[3007.x] Merge 3006.x into 3007.x
This commit is contained in:
Pedro Algarvio 2024-05-16 17:05:05 +01:00 committed by GitHub
commit a204ad2d00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 38 additions and 5 deletions

View file

@ -307,6 +307,11 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Merge JUnit XML Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:

View file

@ -335,6 +335,11 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Merge JUnit XML Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:

View file

@ -308,6 +308,11 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Merge JUnit XML Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:

View file

@ -239,6 +239,11 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Merge Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:

View file

@ -222,6 +222,11 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Merge Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:

View file

@ -238,6 +238,11 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Merge Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:

View file

@ -228,11 +228,14 @@ def test_owner(modules, grains):
# Similar to pkg.owner, but for FreeBSD's pkgng
@pytest.mark.skip_on_freebsd(reason="test for new package manager for FreeBSD")
@pytest.mark.requires_salt_modules("pkg.which")
def test_which(modules):
def test_which(modules, grains):
"""
test finding the package owning a file
"""
ret = modules.pkg.which("/usr/local/bin/salt-call")
binary = "/bin/ls"
if grains["os"] == "Ubuntu" and grains["osmajorrelease"] >= 24:
binary = "/usr/bin/ls"
ret = modules.pkg.which(binary)
assert len(ret) != 0
@ -399,7 +402,7 @@ def test_pkg_upgrade_has_pending_upgrades(grains, modules):
Test running a system upgrade when there are packages that need upgrading
"""
if grains["os"] == "Arch":
pytest.skipTest("Arch moved to Python 3.8 and we're not ready for it yet")
pytest.skip("Arch moved to Python 3.8 and we're not ready for it yet")
modules.pkg.upgrade()
@ -437,7 +440,7 @@ def test_pkg_upgrade_has_pending_upgrades(grains, modules):
ret = modules.pkg.install(target, version=old)
if not isinstance(ret, dict):
if ret.startswith("ERROR"):
pytest.skipTest(f"Could not install older {target} to complete test.")
pytest.skip(f"Could not install older {target} to complete test.")
# Run a system upgrade, which should catch the fact that the
# targeted package needs upgrading, and upgrade it.
@ -451,7 +454,7 @@ def test_pkg_upgrade_has_pending_upgrades(grains, modules):
else:
ret = modules.pkg.list_upgrades()
if ret == "" or ret == {}:
pytest.skipTest(
pytest.skip(
"No updates available for this machine. Skipping pkg.upgrade test."
)
else: