[control] The admin host is accepted with any port (Docker or a router may publish 443 elsewhere); smoke scripts: Windows-readable paths, curl without Schannel's revocation check, logs on failure

This commit is contained in:
2026-11-17 21:35:34 +01:00
parent 695ed178a5
commit 2aa8d66127
3 changed files with 24 additions and 12 deletions
+8 -3
View File
@@ -12,9 +12,11 @@
#
# scripts/smoke-linux.sh <dist dir with the tarball and install.sh> <ianitor-control binary> <work dir>
set -euo pipefail
# Git Bash on Windows rewrites /paths for Windows programs (docker.exe); the paths here are the container's.
export MSYS_NO_PATHCONV=1 MSYS2_ENV_CONV_EXCL='*'
DIST=$1 CTL=$2 WORK=$3
REPO=$(cd "$(dirname "$0")/.." && pwd)
REPO=$(cd "$(dirname "$0")/.." && (pwd -W 2>/dev/null || pwd))
C=ianitor-smoke-linux
step() { echo "== $*"; }
ok() { echo " ok: $*"; }
@@ -23,6 +25,9 @@ cleanup() { docker rm -f $C >/dev/null 2>&1 || true; docker rmi -f $C:latest >/d
trap cleanup EXIT
[ ! -e "$WORK" ] || fail "$WORK exists; give a new folder"
mkdir -p "$WORK"
# A drive path (F:/...) on Windows, which both Git Bash and the Windows ianitor-control read.
WORK=$(cd "$WORK" && (pwd -W 2>/dev/null || pwd))
DIST=$(cd "$DIST" && (pwd -W 2>/dev/null || pwd))
tarball=$(ls "$DIST"/ianitor-*-linux-x86_64.tar.gz | head -n1)
[ -f "$tarball" ] && [ -f "$DIST/install.sh" ] || fail "no tarball or install.sh in $DIST"
version=$(basename "$tarball" | sed 's/^ianitor-\(.*\)-linux-x86_64.tar.gz$/\1/')
@@ -81,7 +86,7 @@ docker cp "$REPO/scripts/preview.sh" $C:/tmp/preview.sh
url=$(docker exec -e IANITOR_URL=http://127.0.0.1:7878 -e IANITOR_PREVIEW_TOKEN="$FABRICA" $C sh /tmp/preview.sh open shop fix-42 http://127.0.0.1:23456 3600)
[ "$url" = "https://fix-42--shop.pv.smoke.test/" ] || fail "preview URL: $url"
ok "preview URL $url"
body=$(curl -sS --cacert "$WORK/root/domi-root.crt" --resolve fix-42--shop.pv.smoke.test:38443:127.0.0.1 https://fix-42--shop.pv.smoke.test:38443/ || true)
body=$(curl -sS --ssl-no-revoke --cacert "$WORK/root/domi-root.crt" --resolve fix-42--shop.pv.smoke.test:38443:127.0.0.1 https://fix-42--shop.pv.smoke.test:38443/ || true)
[ "$body" = "hello from fix-42" ] || fail "the preview through edge: $body"
ok "the preview answers through edge (Pingora under systemd), with a Domi certificate"
code=$(api "$FABRICA" -o /dev/null -w '%{http_code}' http://127.0.0.1:7878/api/v1/hosts)
@@ -91,7 +96,7 @@ ok "the preview token cannot read the hosts (403)"
step "closed on merge"
docker exec -e IANITOR_URL=http://127.0.0.1:7878 -e IANITOR_PREVIEW_TOKEN="$FABRICA" $C sh /tmp/preview.sh close shop fix-42 >/dev/null
for i in $(seq 45); do
code=$(curl -s -o /dev/null -w '%{http_code}' --cacert "$WORK/root/domi-root.crt" --resolve fix-42--shop.pv.smoke.test:38443:127.0.0.1 https://fix-42--shop.pv.smoke.test:38443/ || true)
code=$(curl -s -o /dev/null -w '%{http_code}' --ssl-no-revoke --cacert "$WORK/root/domi-root.crt" --resolve fix-42--shop.pv.smoke.test:38443:127.0.0.1 https://fix-42--shop.pv.smoke.test:38443/ || true)
[ "$code" != 200 ] && break
sleep 2
done