Skip to content

Commit 7b5d499

Browse files
srijan55ghidalgo3
andauthored
User/manishkg/remove map token (#257)
* Remove configuration endpoint and update related test to expect 404 * Linting * correctly specify build order --------- Co-authored-by: Gustavo Hidalgo <[email protected]>
1 parent cc8cf42 commit 7b5d499

File tree

6 files changed

+10
-36
lines changed

6 files changed

+10
-36
lines changed

deployment/bin/lib

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ function cluster_login() {
8383
echo "Converting kubeconfig..."
8484
kubelogin convert-kubeconfig \
8585
-l azurecli \
86-
--kubeconfig=kubeconfig
86+
--kubeconfig=kubeconfig \
87+
--yes
8788
export KUBECONFIG=kubeconfig
8889
}
8990

docker-compose.dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ services:
55
build:
66
context: .
77
dockerfile: pcstac/Dockerfile.dev
8+
additional_contexts:
9+
pc-apis-stac: "service:stac"
810
environment:
911
- ENVIRONMENT=development
1012
- POSTGRES_USER=username
@@ -73,6 +75,8 @@ services:
7375
build:
7476
context: .
7577
dockerfile: pctiler/Dockerfile.dev
78+
additional_contexts:
79+
pc-apis-tiler: "service:tiler"
7680
environment:
7781
- ENVIRONMENT=development
7882
- FF_VRT="yes"

pctiler/pctiler/endpoints/configuration.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

pctiler/pctiler/main.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@
2525
from pccommon.openapi import fixup_schema
2626
from pccommon.redis import connect_to_redis
2727
from pctiler.config import get_settings
28-
from pctiler.endpoints import (
29-
configuration,
30-
health,
31-
item,
32-
legend,
33-
pg_mosaic,
34-
vector_tiles,
35-
)
28+
from pctiler.endpoints import health, item, legend, pg_mosaic, vector_tiles
3629
from pctiler.middleware import ModifyResponseMiddleware
3730

3831
# Get the root path if set in the environment
@@ -114,12 +107,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator:
114107
tags=["Collection vector tile endpoints"],
115108
)
116109

117-
app.include_router(
118-
configuration.configuration_router,
119-
prefix=settings.configuration_endpoint_prefix,
120-
tags=["Map configuration endpoints"],
121-
)
122-
123110
app.include_router(health.health_router, tags=["Liveliness/Readiness"])
124111

125112
add_timeout(app, settings.request_timeout)

pctiler/tests/endpoints/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
@pytest.mark.integration
77
async def test_config_token_endpoint(client: AsyncClient) -> None:
88
response = await client.get("/config/map/token")
9-
assert response.status_code == 200
10-
assert response.json()["token"]
9+
# We expect this path to be not found
10+
assert response.status_code == 404

scripts/bin/test-stac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
2828
flake8 pcstac/pcstac pcstac/tests
2929

3030
echo "Running unit tests for stac..."
31-
python3 -m pytest pcstac/tests
31+
python3 -m pytest -vv pcstac/tests
3232

3333
fi

0 commit comments

Comments
 (0)