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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user