mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-25 20:06:56 +00:00
fix: address Copilot review round 3
- Fix bare Skip-IfNoTarget calls in 13_Firewall and 14_Backup (missing if/return pattern caused tests to run when they should skip) - Validate modifier-only switches in dev.ps1 (-Force/-Reprovision without an action switch now errors instead of defaulting to -Shell) - Add force-cleanup to usage text in run-integration.sh - Add --connect-timeout/--max-time to guest agent curl in wait-for-pve.sh Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -707,12 +707,13 @@ main() {
|
||||
taint) cmd_taint "$@" ;;
|
||||
all) cmd_all "$@" ;;
|
||||
*)
|
||||
echo "Usage: $(basename "$0") {provision|test|cleanup|taint|all} [8|9|all] [test-filter]"
|
||||
echo "Usage: $(basename "$0") {provision|test|cleanup|force-cleanup|taint|all} [8|9|all] [test-filter]"
|
||||
echo ""
|
||||
echo "Subcommands:"
|
||||
echo " provision [8|9|all] Provision nested PVE VMs + storage containers"
|
||||
echo " test [8|9|all] [filter] Run integration tests (default: all versions, no filter)"
|
||||
echo " cleanup [8|9|all] Destroy resources via terraform destroy (default: all)"
|
||||
echo " force-cleanup [8|9|all] Bypass Terraform — destroy via API + wipe state (recovery)"
|
||||
echo " taint [8|9|all] Mark VMs for recreation on next provision"
|
||||
echo " all [8|9|all] Full lifecycle: provision → test → cleanup"
|
||||
echo ""
|
||||
|
||||
@@ -22,7 +22,7 @@ echo "Waiting for guest agent on VM ${VM_ID} (node: ${PARENT_NODE})..."
|
||||
VM_IP=""
|
||||
elapsed=0
|
||||
while [ $elapsed -lt $MAX_WAIT ]; do
|
||||
AGENT_RESPONSE=$(curl -sk \
|
||||
AGENT_RESPONSE=$(curl -sk --connect-timeout 5 --max-time 10 \
|
||||
-H "Authorization: PVEAPIToken=${PARENT_TOKEN}" \
|
||||
"${PARENT_API}/nodes/${PARENT_NODE}/qemu/${VM_ID}/agent/network-get-interfaces" 2>/dev/null || true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user