Files
geointel/scripts/verify_gis_runtime.sh
T
Codex 97017c6512
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled
Track executable script permissions
2026-06-16 23:41:02 +02:00

41 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${1:-${GE_INTEL_BASE_URL:-http://localhost:1202}}"
CAPABILITIES_URL="${BASE_URL%/}/api/v1/system/capabilities"
echo "== GeoIntel GIS runtime verification =="
echo "Checking: ${CAPABILITIES_URL}"
if ! command -v curl >/dev/null 2>&1; then
echo "curl is required for GIS runtime verification" >&2
exit 1
fi
response="$(curl -fsS "${CAPABILITIES_URL}")"
if printf '%s' "${response}" | grep -qi '<!doctype html'; then
echo "Capabilities endpoint returned HTML; frontend proxy/API routing is not correct" >&2
exit 1
fi
if ! printf '%s' "${response}" | grep -q '"postgis":true'; then
echo "PostGIS capability is not reported as available" >&2
printf '%s\n' "${response}" >&2
exit 1
fi
if ! printf '%s' "${response}" | grep -q '"rasterio":true'; then
echo "Rasterio capability is not reported as available in the running backend image" >&2
printf '%s\n' "${response}" >&2
exit 1
fi
if ! printf '%s' "${response}" | grep -q '"geopandas":true'; then
echo "GeoPandas capability is not reported as available in the running backend image" >&2
printf '%s\n' "${response}" >&2
exit 1
fi
echo "GIS runtime capabilities are available."