#!/bin/bash # Run geo service GraphQL endpoint tests set -e cd "$(dirname "$0")" echo "๐Ÿงช Running Geo Service GraphQL Tests" echo "====================================" echo "" # Check if TEST_GEO_URL is set, otherwise use production if [ -z "$TEST_GEO_URL" ]; then export TEST_GEO_URL="https://geo.optovia.ru/graphql/public/" echo "๐Ÿ“ Testing against: $TEST_GEO_URL (production)" else echo "๐Ÿ“ Testing against: $TEST_GEO_URL" fi echo "" # Install dependencies if needed if ! poetry run python -c "import pytest" 2>/dev/null; then echo "๐Ÿ“ฆ Installing dependencies..." poetry install --with dev echo "" fi # Run tests echo "๐Ÿš€ Running tests..." echo "" poetry run pytest tests/test_graphql_endpoints.py -v -s "$@" echo "" echo "โœ… Test run complete"