Skip to content

Commit 6ef1053

Browse files
committed
Rewrite also dev-api
This is needed because playwright images used in CI e2e tests are built from master, so the path change doesn't take effect until it's merged to master
1 parent de403cc commit 6ef1053

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apigw/src/app.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ export function apiRouter(config: Config, redisClient: RedisClient) {
8686
req.url = '/employee-mobile/auth/pin-login'
8787
} else if (req.url === '/internal/auth/pin-logout') {
8888
req.url = '/employee-mobile/auth/pin-logout'
89+
} else if (req.url === '/internal/dev-api') {
90+
req.url = '/dev-api/'
8991
}
9092
next()
9193
})
@@ -245,8 +247,8 @@ export function apiRouter(config: Config, redisClient: RedisClient) {
245247
cookieParser(config.employee.cookieSecret),
246248
devApiE2ESignup(employeeMobileSessions)
247249
)
248-
router.use(
249-
'/dev-api',
250+
router.all(
251+
'/dev-api/*',
250252
createProxy({
251253
getUserHeader: () => undefined
252254
})

compose/e2e/playwright/bin/run-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ yarn install --immutable
2222
yarn exec playwright install
2323

2424
echo 'INFO: Waiting for compose stack to be up ...'
25-
wait-for-url.sh "${PROXY_URL}/api/dev-api"
25+
wait-for-url.sh "${PROXY_URL}/api/dev-api/"
2626
wait-for-url.sh "${KEYCLOAK_URL}/auth/realms/evaka-customer/account/" "200"
2727
wait-for-url.sh "${DUMMY_SUOMIFI_URL}/health" "200"
2828

0 commit comments

Comments
 (0)