test phase 23 verification script
This commit is contained in:
@@ -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" \
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)}"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user