This commit is contained in:
David Schroeder
2026-07-25 21:26:23 -05:00
parent 2b8b2c8f6f
commit fd23ec525a
3 changed files with 178 additions and 32 deletions
+10
View File
@@ -44,6 +44,14 @@ assert_failure "Pulse agent token containing whitespace rejected" \
TAPM_PULSE_TOKEN_FROM_RESPONSE '{"token":"invalid token"}'
assert_failure "non-hex Pulse agent token rejected" \
TAPM_PULSE_TOKEN_FROM_RESPONSE '{"token":"not-a-token"}'
assert_success "registered Pulse agent response accepted" \
TAPM_PULSE_AGENT_REGISTERED_FROM_RESPONSE \
'{"agent":{"id":"agent-123","hostname":"pve1"}}'
assert_failure "missing Pulse agent ID rejected" \
TAPM_PULSE_AGENT_REGISTERED_FROM_RESPONSE '{"agent":{"hostname":"pve1"}}'
assert_equal '{"type":"pve","enableCommands":false}' \
"$(TAPM_PULSE_AGENT_TOKEN_REQUEST_JSON)" \
"Proxmox-specific agent enrollment requested with commands disabled"
nodes_json='[
{"node":"pve3","status":"offline"},
@@ -85,6 +93,8 @@ resources='[
assert_success "tagged Pulse LXC detected" TAPM_PULSE_RESOURCE_INSTALLED "$resources"
assert_success "legacy Pulse hostname detected" \
TAPM_PULSE_RESOURCE_INSTALLED '[{"type":"lxc","name":"Pulse"}]'
assert_success "untagged default Pulse hostname detected" \
TAPM_PULSE_RESOURCE_INSTALLED '[{"type":"lxc","name":"Pulse-Monitor"}]'
assert_failure "unrelated resource not detected" \
TAPM_PULSE_RESOURCE_INSTALLED '[{"type":"qemu","name":"pulse"}]'