mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Special-case Ubuntu 24.04
This commit is contained in:
parent
1b3368b13d
commit
23ee362db6
1 changed files with 10 additions and 4 deletions
|
@ -213,11 +213,14 @@ def test_mod_del_repo_multiline_values(modules):
|
|||
|
||||
|
||||
@pytest.mark.requires_salt_modules("pkg.owner")
|
||||
def test_owner(modules):
|
||||
def test_owner(modules, grains):
|
||||
"""
|
||||
test finding the package owning a file
|
||||
"""
|
||||
binary = shutil.which("ls")
|
||||
binary = "/bin/ls"
|
||||
if grains["os"] == "Ubuntu" and grains["osmajorrelease"] >= 24:
|
||||
binary = "/usr/bin/ls"
|
||||
|
||||
ret = modules.pkg.owner(binary)
|
||||
assert len(ret) != 0
|
||||
|
||||
|
@ -225,11 +228,14 @@ def test_owner(modules):
|
|||
# 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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue