WitNote / tests /e2e /scenarios-cli /32-security.sh
AUXteam's picture
Upload folder using huggingface_hub
6a7089a verified
#!/bin/bash
# 32-security.sh β€” CLI security commands
source "$(dirname "$0")/common.sh"
# ─────────────────────────────────────────────────────────────────
start_test "pinchtab security (non-interactive)"
# In non-interactive mode (piped), should show security posture and exit
pt security
# Security may exit 0 or non-zero depending on posture, just verify it runs without crashing
if [ -n "$PT_OUT" ] || [ "$PT_CODE" -eq 0 ] || [ "$PT_CODE" -ne 0 ]; then
echo -e " ${GREEN}βœ“${NC} security command executed (exit code: $PT_CODE)"
((ASSERTIONS_PASSED++)) || true
else
echo -e " ${RED}βœ—${NC} security command failed unexpectedly"
((ASSERTIONS_FAILED++)) || true
fi
end_test
# ─────────────────────────────────────────────────────────────────
start_test "pinchtab security up"
pt_ok security up
end_test
# ─────────────────────────────────────────────────────────────────
start_test "pinchtab security down"
pt_ok security down
end_test