Skip to content

Commit bcdc481

Browse files
committed
ci: rename profile env var so Spring Boot does not bind it
Spring Boot's relaxed binding maps the SPRING_PROFILES environment variable to the invalid 'spring.profiles' property and refuses to start. APP_PROFILES is only read by the Playwright webServer command.
1 parent c3e7b85 commit bcdc481

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ jobs:
8282
- name: Run E2E tests (MFA disabled)
8383
working-directory: playwright
8484
env:
85-
SPRING_PROFILES: playwright-test
85+
APP_PROFILES: playwright-test
8686
run: npx playwright test --project=chromium
8787

8888
- name: Run E2E tests (MFA enabled)
8989
working-directory: playwright
9090
env:
91-
SPRING_PROFILES: playwright-test,mfa
91+
APP_PROFILES: playwright-test,mfa
9292
run: npx playwright test --project=chromium-mfa
9393

9494
- name: Upload Playwright report

playwright/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default defineConfig({
8888
*
8989
* Tests tagged @mfa-enabled need the server running with the mfa profile and are excluded from
9090
* the default projects (whose specs assume MFA is off). Run them with:
91-
* SPRING_PROFILES=local,playwright-test,mfa npx playwright test --project=chromium-mfa
91+
* APP_PROFILES=local,playwright-test,mfa npx playwright test --project=chromium-mfa
9292
*/
9393
projects: [
9494
{
@@ -132,7 +132,7 @@ export default defineConfig({
132132

133133
/* Run your local dev server before starting the tests */
134134
webServer: {
135-
command: `cd .. && ./gradlew bootRun --args="--spring.profiles.active=${process.env.SPRING_PROFILES || 'local,playwright-test'}"`,
135+
command: `cd .. && ./gradlew bootRun --args="--spring.profiles.active=${process.env.APP_PROFILES || 'local,playwright-test'}"`,
136136
url: 'http://localhost:8080',
137137
reuseExistingServer: !process.env.CI,
138138
timeout: 120000,

playwright/tests/mfa/mfa-flow.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { test, expect, generateTestUser, createAndLoginUser } from '../../src/fi
44
* Full MFA flow E2E test using Chromium's CDP WebAuthn virtual authenticator.
55
*
66
* Requires the app to run with MFA enabled:
7-
* SPRING_PROFILES=local,playwright-test,mfa npx playwright test --project=chromium-mfa
7+
* APP_PROFILES=local,playwright-test,mfa npx playwright test --project=chromium-mfa
88
* (or start the server yourself with those profiles; the mfa profile must come last so its
99
* overrides win).
1010
*

0 commit comments

Comments
 (0)