test phase 23 verification script

This commit is contained in:
voltsrage
2026-06-24 01:19:03 +08:00
parent 2e80700bf0
commit 032cd1d240
14 changed files with 240 additions and 86 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
CENTRAL="${CENTRAL_URL:-http://localhost:5080}"
CENTRAL="${CENTRAL_URL:-http://localhost:5270}"
GATEWAY="${GATEWAY_URL:-http://localhost:5081}"
JWT="${ADMIN_JWT:?Set ADMIN_JWT to a valid admin bearer token}"
GATEWAY_JWT="${GATEWAY_JWT:?Set GATEWAY_JWT to a valid gateway dashboard JWT}"
@@ -24,7 +24,7 @@ docker network disconnect "$NETWORK" "$GATEWAY_CONTAINER" 2>/dev/null || true
echo "Partition active — posting observation to gateway..."
ENCOUNTER_ID=$(curl -sf "$GATEWAY/api/v1/encounters?status=ACTIVE&department=ICU" \
-H "Authorization: Bearer $GATEWAY_JWT" | jq -r '.data.items[0].id')
-H "Authorization: Bearer $GATEWAY_JWT" | jq -r '.data.items[0].encounterId')
curl -sf -X POST "$GATEWAY/api/v1/encounters/$ENCOUNTER_ID/observations" \
-H "Authorization: Bearer $GATEWAY_JWT" \
+1 -1
View File
@@ -11,7 +11,7 @@ echo "==> Run gateway registry tests"
dotnet test VigilCareClinicalAPI.Tests --filter "FullyQualifiedName~GatewayRegistry" --no-build 2>/dev/null \
|| dotnet test VigilCareClinicalAPI.Tests --filter "FullyQualifiedName~GatewayRegistry"
API="${API_BASE_URL:-http://localhost:5080}"
API="${API_BASE_URL:-http://localhost:5270}"
KEY="${GATEWAY_API_KEY:-dev-gateway-key-change-in-production}"
# Obtain admin JWT (adjust to your local login endpoint)
+1 -1
View File
@@ -5,7 +5,7 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
GW="${GATEWAY_URL:-http://localhost:5081}"
CENTRAL="${CENTRAL_URL:-http://localhost:5080}"
CENTRAL="${CENTRAL_URL:-http://localhost:5270}"
SITE_ID="${SITE_ID:-11111111-1111-1111-1111-111111111111}"
GW_ID="${GATEWAY_ID:-22222222-2222-2222-2222-222222222222}"
ADMIN_JWT="${ADMIN_JWT:?Set ADMIN_JWT (central admin JWT)}"
+1 -1
View File
@@ -4,7 +4,7 @@ set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
CENTRAL="${CENTRAL_URL:-http://localhost:5080}"
CENTRAL="${CENTRAL_URL:-http://localhost:5270}"
GATEWAY="${GATEWAY_URL:-http://localhost:5081}"
KEY="${GATEWAY_API_KEY:-dev-gateway-key-change-in-production}"
GW_ID="${GATEWAY_ID:-22222222-2222-2222-2222-222222222222}"
+1
View File
@@ -12,6 +12,7 @@ cd vigilcare-dashboard && npm run test -- GatewayOperations.spec.js && cd ..
echo "==> Optional partition demo (skip with SKIP_PARTITION=1)"
if [[ "${SKIP_PARTITION:-0}" != "1" ]]; then
export CENTRAL_URL="${CENTRAL_URL:-http://localhost:5270}"
./scripts/demo-network-partition.sh
fi