Files
homelab-frontend/scripts/test-integration.sh
T
Admin Bot 4953580a8d
CI / Vet, test, build (push) Canceled after 11s
CI / Build and push image (push) Canceled after 0s
test: real integration tests calling actual service operations
REAL tests that call actual services, not fake routing checks:
- Get real JWT from Authentik (client_credentials flow)
- Call SQS list-queues and send-message
- Call MinIO/S3 list-objects with JWT
- Call Authentik API with JWT
- Call Memory query operations
- Call Temporal (gRPC not yet implemented)

Tests gracefully skip if services unreachable (502/504).
Tests warn if operations partially integrated (e.g., MinIO JWT not validated).
Tests document current JWT integration state vs. what's still TODO.

Configuration:
  GATEWAY_URL=https://api.riotpiao.com
  AUTHENTIK_CLIENT_ID=<from OAuth2 provider>
  AUTHENTIK_CLIENT_SECRET=<from OAuth2 provider>
  TEST_TIMEOUT=30

Run: ./scripts/test-integration.sh

Documentation:
- INTEGRATION_TESTS.md lists what's working vs. TODO
- Phase 3: Implement actual JWT validation in services
- Phase 9: Add gRPC proxying for Temporal
2026-08-27 11:20:21 -07:00

41 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Run REAL integration tests against live gateway
# These tests call actual services and validate real operations
# Not routing checks - actual API operations
set -e
GATEWAY_URL=${GATEWAY_URL:-http://localhost:8080}
AUTHENTIK_URL=${AUTHENTIK_URL:-https://authentik.riotpiao.com}
AUTHENTIK_CLIENT_ID=${AUTHENTIK_CLIENT_ID:-}
AUTHENTIK_CLIENT_SECRET=${AUTHENTIK_CLIENT_SECRET:-}
TEST_TIMEOUT=${TEST_TIMEOUT:-30}
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Real Integration Tests"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Gateway: $GATEWAY_URL"
echo "Authentik: $AUTHENTIK_URL"
echo "Timeout: ${TEST_TIMEOUT}s"
echo ""
if [ -z "$AUTHENTIK_CLIENT_ID" ]; then
echo "⚠️ No AUTHENTIK_CLIENT_ID set"
echo "Tests will skip JWT authentication"
echo ""
echo "To enable auth tests, set:"
echo " export AUTHENTIK_CLIENT_ID=<id>"
echo " export AUTHENTIK_CLIENT_SECRET=<secret>"
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
export GATEWAY_URL
export AUTHENTIK_URL
export AUTHENTIK_CLIENT_ID
export AUTHENTIK_CLIENT_SECRET
export TEST_TIMEOUT
go test -tags integration -v ./internal/serviceadapter -run TestRealIntegration