Skip to content

Commit cce36d9

Browse files
committed
Fix ansible test flakiness from install cache short-circuit
Pass no_cache=True in the security-controls warning test so the install handler always runs (and emits warnings) even when the package is already present on the system from a prior test or host state. https://claude.ai/code/session_01F3rkN6ZccKrtGTwXLHaof7
1 parent 5459ad6 commit cce36d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_ansibleprovider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def test_unsupported_security_controls_warn_and_continue(
124124
package,
125125
postinstall_scripts=False,
126126
min_release_age=1,
127+
no_cache=True,
127128
)
128129
test_machine.assert_shallow_binary_loaded(installed)
129130
assert "ignoring unsupported min_release_age=1" in caplog.text
@@ -137,7 +138,7 @@ def test_unsupported_security_controls_warn_and_continue(
137138
min_release_age=1,
138139
)
139140
with caplog.at_level(logging.WARNING, logger="abxpkg.binprovider"):
140-
installed = binary.install()
141+
installed = binary.install(no_cache=True)
141142
test_machine.assert_shallow_binary_loaded(installed)
142143
assert "ignoring unsupported min_release_age=1" in caplog.text
143144
assert "ignoring unsupported postinstall_scripts=False" in caplog.text

0 commit comments

Comments
 (0)