mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-25 05:23:58 -07:00
Improve docs, make sure that packages is always returned, deprecate update_cache behavior.
This commit is contained in:
parent
c698ecd201
commit
23a92c0fd5
3 changed files with 36 additions and 8 deletions
|
|
@ -325,6 +325,7 @@ class TestPacman:
|
|||
P.run()
|
||||
self.mock_run_command.call_count == 0
|
||||
out = e.value.args[0]
|
||||
assert "packages" not in out
|
||||
assert out["changed"]
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
@ -582,8 +583,9 @@ class TestPacman:
|
|||
with pytest.raises(AnsibleExitJson) as e:
|
||||
P.run()
|
||||
out = e.value.args[0]
|
||||
assert "packages" not in out
|
||||
assert "packages" in out
|
||||
assert not out["changed"]
|
||||
assert "packages" in out
|
||||
assert "diff" not in out
|
||||
self.mock_run_command.call_count == 0
|
||||
|
||||
|
|
@ -1010,6 +1012,7 @@ class TestPacman:
|
|||
if raises == AnsibleExitJson:
|
||||
assert out["packages"] == expected_packages
|
||||
assert out["changed"]
|
||||
assert "packages" in out
|
||||
assert "diff" in out
|
||||
else:
|
||||
assert out["stdout"] == "stdout"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue