Skip to content

Commit

Permalink
Merge 3006.x into 3007.x
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed May 16, 2024
2 parents 70324fa + 6052a1e commit eb3e6eb
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-action-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-action-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-action-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-packages-action-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-packages-action-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-packages-action-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 8 additions & 5 deletions tests/pytests/functional/modules/test_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down

0 comments on commit eb3e6eb

Please sign in to comment.