Use local API endpoint in smoke test

This commit is contained in:
Aaron
2026-01-02 23:49:38 -05:00
parent 9c3156df35
commit 24e89b516f

View File

@@ -9,6 +9,7 @@ PIKIT_SSH_KEY="${PIKIT_SSH_KEY:-$HOME/.ssh/pikit}"
PIKIT_SSH_OPTS="${PIKIT_SSH_OPTS:-}"
PIKIT_HTTP_URL="${PIKIT_HTTP_URL:-http://$PIKIT_HOST}"
PIKIT_HTTPS_URL="${PIKIT_HTTPS_URL:-https://$PIKIT_HOST}"
PIKIT_API_URL="${PIKIT_API_URL:-http://127.0.0.1:4000}"
LOCAL_ONLY=0
ERRORS=0
@@ -126,7 +127,7 @@ check_https() {
check_api() {
local url="$1"
local body
if ! body="$(curl -kfsSL --max-time 5 "$url")"; then
if ! body="$(remote_cmd "curl -fsS --max-time 5 $url")"; then
status FAIL "API not reachable: $url"
return
fi
@@ -155,7 +156,7 @@ PY
check_firstboot() {
local url="$1"
local body state error_present
if ! body="$(curl -kfsSL --max-time 5 "$url")"; then
if ! body="$(remote_cmd "curl -fsS --max-time 5 $url")"; then
status FAIL "firstboot API not reachable"
return
fi
@@ -216,10 +217,10 @@ main() {
check_https "$PIKIT_HTTPS_URL" "HTTPS"
section "API"
check_api "$PIKIT_HTTP_URL/api/status"
check_api "$PIKIT_API_URL/api/status"
section "Firstboot"
check_firstboot "$PIKIT_HTTP_URL/api/firstboot"
check_firstboot "$PIKIT_API_URL/api/firstboot"
section "Services"
check_services