Skip to content

Commit

Permalink
Fix broken test on Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed May 15, 2024
1 parent f72dd14 commit 7835f3a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/pytests/functional/modules/test_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,10 @@ def test_which(grains, modules):
"""
test finding the package owning a file
"""
if grains["os_family"] in ["Debian", "RedHat"]:
file = "/bin/mknod"
else:
file = "/usr/local/bin/salt-call"
ret = modules.pkg.which(file)
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

0 comments on commit 7835f3a

Please sign in to comment.