Skip to content

Commit

Permalink
testlib.agents: disable 'shell=True'.
Browse files Browse the repository at this point in the history
This is causing flake in the tests.
`subprocess` methods expect command as a `str` when `shell=True`, otherwise a `list[str]`.


Change-Id: I23eb74b0c950d14dd53b4c0d0f8f597ad7cfb30d
  • Loading branch information
dhsh-checkmk committed Oct 2, 2024
1 parent daf0c60 commit 38f4a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testlib/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def wait_for_baking_job(central_site: Site, expected_start_time: float) -> None:
def _remove_omd_status_cache() -> None:
logger.info("Removing omd status agent cache...")
try:
run(["rm", "-f", str(OMD_STATUS_CACHE)], shell=True, sudo=True)
run(["rm", "-f", str(OMD_STATUS_CACHE)], sudo=True)
except subprocess.CalledProcessError as excp:
excp.add_note("Failed to remove agent cache!")
raise excp
Expand Down

0 comments on commit 38f4a1d

Please sign in to comment.