fix(payment): make Swish QR code scannable by the Swish app #16
|
|
@ -90,7 +90,7 @@ services:
|
|||
|
hermes
commented
🔵 Removing 🔵 Removing `curl -f` correctly fixes the false-failure (404 on a non-existent plate *is* a valid "server-up" signal), but it also masks HTTP 500 — which would indicate a genuinely broken backend (e.g., DB-connection error after Spring Boot boots). If Spring Boot Actuator is available, pointing at a real health endpoint would be cleaner:\n```sh\ncurl -sf http://backend:8080/actuator/health > /dev/null && break;\n```\nOtherwise, explicitly exclude 5xx:\n```sh\ncurl -s -o /dev/null -w "%{http_code}" http://backend:8080/api/vehicles/ZZZ999 | grep -qv '^5' && break;\n```
|
||||
done;
|
||||
echo 'Waiting for backend...';
|
||||
for i in \$(seq 1 120); do
|
||||
curl -sf http://backend:8080/api/vehicles/ZZZ999 > /dev/null && break;
|
||||
|
hermes
commented
🔵 Removing 🔵 Removing `curl -f` correctly fixes the false-failure (404 on a non-existent plate *is* a valid "server-up" signal), but it also masks HTTP 500 — which would indicate a genuinely broken backend (e.g., DB-connection error after Spring Boot boots). If Spring Boot Actuator is available, pointing at a real health endpoint would be cleaner:\n```sh\ncurl -sf http://backend:8080/actuator/health > /dev/null && break;\n```\nOtherwise, explicitly exclude 5xx:\n```sh\ncurl -s -o /dev/null -w "%{http_code}" http://backend:8080/api/vehicles/ZZZ999 | grep -qv '^5' && break;\n```
|
||||
curl -s -o /dev/null http://backend:8080/api/vehicles/ZZZ999 && break;
|
||||
|
hermes
commented
🔵 Removing 🔵 Removing `curl -f` correctly fixes the false-failure (404 on a non-existent plate *is* a valid "server-up" signal), but it also masks HTTP 500 — which would indicate a genuinely broken backend (e.g., DB-connection error after Spring Boot boots). If Spring Boot Actuator is available, pointing at a real health endpoint would be cleaner:\n```sh\ncurl -sf http://backend:8080/actuator/health > /dev/null && break;\n```\nOtherwise, explicitly exclude 5xx:\n```sh\ncurl -s -o /dev/null -w "%{http_code}" http://backend:8080/api/vehicles/ZZZ999 | grep -qv '^5' && break;\n```
|
||||
sleep 1;
|
||||
done;
|
||||
echo 'Waiting for frontend...';
|
||||
|
|
|
|||
|
hermes
commented
🔵 Removing 🔵 Removing `curl -f` correctly fixes the false-failure (404 on a non-existent plate *is* a valid "server-up" signal), but it also masks HTTP 500 — which would indicate a genuinely broken backend (e.g., DB-connection error after Spring Boot boots). If Spring Boot Actuator is available, pointing at a real health endpoint would be cleaner:\n```sh\ncurl -sf http://backend:8080/actuator/health > /dev/null && break;\n```\nOtherwise, explicitly exclude 5xx:\n```sh\ncurl -s -o /dev/null -w "%{http_code}" http://backend:8080/api/vehicles/ZZZ999 | grep -qv '^5' && break;\n```
hermes
commented
🔵 Removing 🔵 Removing `curl -f` correctly fixes the false-failure (404 on a non-existent plate *is* a valid "server-up" signal), but it also masks HTTP 500 — which would indicate a genuinely broken backend (e.g., DB-connection error after Spring Boot boots). If Spring Boot Actuator is available, pointing at a real health endpoint would be cleaner:\n```sh\ncurl -sf http://backend:8080/actuator/health > /dev/null && break;\n```\nOtherwise, explicitly exclude 5xx:\n```sh\ncurl -s -o /dev/null -w "%{http_code}" http://backend:8080/api/vehicles/ZZZ999 | grep -qv '^5' && break;\n```
|
||||
|
|
@ -5,7 +5,14 @@ const isCI = !!process.env.PLAYWRIGHT_BASE_URL
|
|||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
timeout: 30_000,
|
||||
retries: 0,
|
||||
// CI flakes: the E2E stack runs 4 parallel Playwright workers against a
|
||||
// single backend (Spring Boot, no -Xmx cap). Under load an occasional
|
||||
// order-creation request transiently fails, which surfaces as a spurious
|
||||
// "navigation to /betalning/ timed out" failure unrelated to the code under
|
||||
// test (e.g. run 103, where 2 navigation tests failed while 94/94 passed
|
||||
// locally on the same commit). Per Playwright's guidance, retry transient
|
||||
// failures in CI; keep retries off locally for fast feedback.
|
||||
retries: isCI ? 2 : 0,
|
||||
use: {
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000',
|
||||
headless: true,
|
||||
|
|
|
|||
🔵 Removing
curl -fcorrectly fixes the false-failure (404 on a non-existent plate is a valid "server-up" signal), but it also masks HTTP 500 — which would indicate a genuinely broken backend (e.g., DB-connection error after Spring Boot boots). If Spring Boot Actuator is available, pointing at a real health endpoint would be cleaner:\nsh\ncurl -sf http://backend:8080/actuator/health > /dev/null && break;\n\nOtherwise, explicitly exclude 5xx:\nsh\ncurl -s -o /dev/null -w "%{http_code}" http://backend:8080/api/vehicles/ZZZ999 | grep -qv '^5' && break;\n