From 712aec60c157ace4e7e777c410ffd794e6055877 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 1 Jun 2026 12:14:53 -0400 Subject: [PATCH] test(host_agent): assert parsed agent version matches AGENT_VERSION constant The on-disk-version test hardcoded '1.0.0' and broke on the 1.1.0 bump. Compare against agent.AGENT_VERSION so future bumps don't require touching the test. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/plugins/host_agent/test_install_template.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/plugins/host_agent/test_install_template.py b/tests/plugins/host_agent/test_install_template.py index efaed79..835242f 100644 --- a/tests/plugins/host_agent/test_install_template.py +++ b/tests/plugins/host_agent/test_install_template.py @@ -69,6 +69,9 @@ def test_rendered_script_passes_sh_n(tmp_path): def test_agent_version_parses_on_disk_agent(): + # Version-agnostic: the parsed value must match the agent module's constant, + # so a future AGENT_VERSION bump doesn't require touching this test. + from plugins.host_agent import agent assert AGENT_SOURCE_PATH.exists() v = _agent_version() - assert v == "1.0.0" + assert v == agent.AGENT_VERSION