Skip to content

Commit

Permalink
Update test from #58883 to work with new work
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Crowell committed Feb 25, 2021
1 parent 042873d commit 5e0397e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/integration/states/test_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ def test_pkg_016_conditionally_ignore_epoch(self):
@pytest.mark.slow_test
def test_pkg_017_installed_held_equals_false(self, grains=None):
"""
Tests that a package installed with held set to False
Tests that a package is installed when hold is explicitly False.
See https://github.com/saltstack/salt/issues/58801.
"""
versionlock_pkg = None
if grains["os_family"] == "RedHat":
Expand Down Expand Up @@ -680,7 +682,14 @@ def test_pkg_017_installed_held_equals_false(self, grains=None):
# On Centos 7 package is already installed, no change happened
if target_ret[tag].get("changes"):
self.assertIn(target, target_ret[tag]["changes"])
self.assertIn("held", target_ret[tag]["comment"])
if grains["os_family"] == "Suse":
self.assertIn("packages were installed", target_ret[tag]["comment"])
else:
# The "held" string is part of a longer comment that may look
# like:
#
# Package units is not being held.
self.assertIn("held", target_ret[tag]["comment"])
finally:
# Clean up, unhold package and remove
ret = self.run_state("pkg.removed", name=target)
Expand Down

0 comments on commit 5e0397e

Please sign in to comment.