From 7356fe4bff618ee3aa3dd984146d028f51f1671a Mon Sep 17 00:00:00 2001 From: Robert Detjens Date: Sat, 9 May 2026 16:40:36 -0700 Subject: [PATCH] Add mock frontend server for local test infra Signed-off-by: Robert Detjens --- tests/repo/rcds.yaml | 2 +- tests/services.compose.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/repo/rcds.yaml b/tests/repo/rcds.yaml index b71cb1e..0f2581a 100644 --- a/tests/repo/rcds.yaml +++ b/tests/repo/rcds.yaml @@ -33,7 +33,7 @@ deploy: profiles: # configure per-environment credentials etc testing: - frontend_url: https://frontend.example + frontend_url: http://mock_frontend.localhost:8080 frontend_token: secretsecretsecret challenges_domain: chals.frontend.example kubecontext: testcluster diff --git a/tests/services.compose.yaml b/tests/services.compose.yaml index a3aa02e..4f8c5b0 100644 --- a/tests/services.compose.yaml +++ b/tests/services.compose.yaml @@ -38,3 +38,29 @@ services: /usr/bin/mc anonymous set download myminio/testbucket; exit 0; " + + mock_frontend: + image: nginx:alpine + ports: + - 8080:80 + entrypoint: + - sh + - -c + - | + cat <<'EOF' > /etc/nginx/conf.d/default.conf + server { + listen 80; + default_type application/json; + + location /api/checkaccess { + return 200 '{"status":"ok"}'; + } + + location /api/resolvestate { + limit_except POST { + return 200 '{"current":[],"removed":[]}'; + } + } + } + EOF + nginx -g 'daemon off;'