diff --git a/deployment/bin/lib b/deployment/bin/lib index 858ec5c8..8d0ca1a1 100755 --- a/deployment/bin/lib +++ b/deployment/bin/lib @@ -83,7 +83,8 @@ function cluster_login() { echo "Converting kubeconfig..." kubelogin convert-kubeconfig \ -l azurecli \ - --kubeconfig=kubeconfig + --kubeconfig=kubeconfig \ + --yes export KUBECONFIG=kubeconfig } diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index db217ddd..dcd860be 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: pcstac/Dockerfile.dev + additional_contexts: + pc-apis-stac: "service:stac" environment: - ENVIRONMENT=development - POSTGRES_USER=username @@ -73,6 +75,8 @@ services: build: context: . dockerfile: pctiler/Dockerfile.dev + additional_contexts: + pc-apis-tiler: "service:tiler" environment: - ENVIRONMENT=development - FF_VRT="yes" diff --git a/pctiler/pctiler/endpoints/configuration.py b/pctiler/pctiler/endpoints/configuration.py deleted file mode 100644 index 1b4ce74b..00000000 --- a/pctiler/pctiler/endpoints/configuration.py +++ /dev/null @@ -1,18 +0,0 @@ -from fastapi import APIRouter - -from pccommon.credential import PcDefaultAzureCredential -from pctiler.models import AzMapsToken - -tokenProvider = PcDefaultAzureCredential() -configuration_router = APIRouter() - - -@configuration_router.get("/map/token", response_model=AzMapsToken) -def get_azmaps_token() -> AzMapsToken: - """ - Fetch a token for the Azure Maps API service based on the current - service identity. This token is used for the Explorer to authenticate - with the Azure Maps API service. - """ - accessToken = tokenProvider.get_token("https://atlas.microsoft.com/.default") - return AzMapsToken(token=accessToken.token, expires_on=accessToken.expires_on) diff --git a/pctiler/pctiler/main.py b/pctiler/pctiler/main.py index f82ff17d..a8822bdf 100755 --- a/pctiler/pctiler/main.py +++ b/pctiler/pctiler/main.py @@ -25,14 +25,7 @@ from pccommon.openapi import fixup_schema from pccommon.redis import connect_to_redis from pctiler.config import get_settings -from pctiler.endpoints import ( - configuration, - health, - item, - legend, - pg_mosaic, - vector_tiles, -) +from pctiler.endpoints import health, item, legend, pg_mosaic, vector_tiles from pctiler.middleware import ModifyResponseMiddleware # Get the root path if set in the environment @@ -114,12 +107,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator: tags=["Collection vector tile endpoints"], ) -app.include_router( - configuration.configuration_router, - prefix=settings.configuration_endpoint_prefix, - tags=["Map configuration endpoints"], -) - app.include_router(health.health_router, tags=["Liveliness/Readiness"]) add_timeout(app, settings.request_timeout) diff --git a/pctiler/tests/endpoints/test_config.py b/pctiler/tests/endpoints/test_config.py index 22abcaef..7c82d046 100644 --- a/pctiler/tests/endpoints/test_config.py +++ b/pctiler/tests/endpoints/test_config.py @@ -6,5 +6,5 @@ @pytest.mark.integration async def test_config_token_endpoint(client: AsyncClient) -> None: response = await client.get("/config/map/token") - assert response.status_code == 200 - assert response.json()["token"] + # We expect this path to be not found + assert response.status_code == 404 diff --git a/scripts/bin/test-stac b/scripts/bin/test-stac index 41982cc3..73c1af2b 100755 --- a/scripts/bin/test-stac +++ b/scripts/bin/test-stac @@ -28,6 +28,6 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then flake8 pcstac/pcstac pcstac/tests echo "Running unit tests for stac..." - python3 -m pytest pcstac/tests + python3 -m pytest -vv pcstac/tests fi