From ae3a7269eff1d9db8505e978ee1e744637b9a22c Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Tue, 17 Sep 2024 21:56:59 +0200 Subject: [PATCH] chore: fix setup test missing envs --- .../app-node-express/test/setup/globalSetup.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/mern-sample-app/app-node-express/test/setup/globalSetup.ts b/packages/mern-sample-app/app-node-express/test/setup/globalSetup.ts index 0bab3c47..74f1bf94 100644 --- a/packages/mern-sample-app/app-node-express/test/setup/globalSetup.ts +++ b/packages/mern-sample-app/app-node-express/test/setup/globalSetup.ts @@ -23,8 +23,14 @@ export default async () => { const mongoUrl = mongoUri.replace("mongodb://", ""); const [host, port] = mongoUrl.split(":"); process.env.SERVER_PORT = String(TEST_PORT); + process.env.SERVER_DOMAIN = `http://localhost`; + process.env.SERVER_SESSION_SECRET = "secret-test-key"; process.env.DATABASE_URL = `mongodb://${host}:${port}`; process.env.DATABASE_NAME = dbDatabase; + process.env.KEYCLOAK_URL = "https://keycloak-production-86f5.up.railway.app"; + process.env.KEYCLOAK_ADMIN_CLI_SECRET = "RVi9hykmCMS5WKUcemDhX8Kar4vQP09E"; + process.env.CORS_ALLOWED_ORIGINS = "http://localhost:5173"; + return async () => { if (teardown) throw new Error("teardown called twice"); teardown = true;