update cpu checks

This commit is contained in:
David Schroeder
2026-07-25 23:38:23 -05:00
parent 70f5c09cec
commit baa7846a15
4 changed files with 83 additions and 10 deletions
+20
View File
@@ -185,6 +185,26 @@ assert_success "untagged default Pulse hostname detected" \
assert_failure "unrelated resource not detected" \
TAPM_PULSE_RESOURCE_INSTALLED '[{"type":"qemu","name":"pulse"}]'
test_pulse_config_detection() {
local fixture_root status
fixture_root="$(mktemp -d /tmp/tapm-pulse-configs.XXXXXX)" || return 1
mkdir -p "${fixture_root}/pve1/lxc" || return 1
printf '%s\n' \
'arch: amd64' \
'hostname: Pulse-Monitor' \
'memory: 2048' >"${fixture_root}/pve1/lxc/200.conf"
TAPM_PULSE_RESOURCE_INSTALLED_FROM_CONFIGS "$fixture_root"
status=$?
rm -rf -- "$fixture_root"
return "$status"
}
assert_success "Pulse LXC detected from shared Proxmox configuration" \
test_pulse_config_detection
assert_failure "missing Pulse configuration directory is not installed" \
TAPM_PULSE_RESOURCE_INSTALLED_FROM_CONFIGS /does/not/exist
ha_status=$'quorum OK\nmaster pve1 (active, Sat Jul 25 12:00:00 2026)\nlrm pve1 (active, Sat Jul 25 12:00:00 2026)'
assert_success "active Proxmox HA detected" TAPM_PULSE_HA_STATUS_ENABLED "$ha_status"
assert_failure "inactive Proxmox HA rejected" \