@camunda/e2e-test-suite 0.0.1244 → 0.0.1245
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/mcpSmSetup.js +13 -7
- package/package.json +1 -1
package/dist/utils/mcpSmSetup.js
CHANGED
|
@@ -13,19 +13,25 @@ exports.getMcpSmVariables = void 0;
|
|
|
13
13
|
* (which use FEEL expressions) can resolve them at runtime.
|
|
14
14
|
*/
|
|
15
15
|
function getMcpSmVariables() {
|
|
16
|
-
const
|
|
17
|
-
`https://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com
|
|
18
|
-
const
|
|
16
|
+
const origin = (process.env.PLAYWRIGHT_BASE_URL ||
|
|
17
|
+
`https://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`).replace(/\/+$/, '');
|
|
18
|
+
const rawContextPath = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
|
|
19
|
+
const contextPath = rawContextPath.startsWith('/')
|
|
20
|
+
? rawContextPath
|
|
21
|
+
: `/${rawContextPath}`;
|
|
22
|
+
const clientId = process.env.MCP_SM_CLIENT_ID ??
|
|
23
|
+
process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENT_ID ??
|
|
24
|
+
'venom';
|
|
19
25
|
const clientSecret = process.env.MCP_SM_CLIENT_SECRET ??
|
|
20
|
-
process.env.
|
|
26
|
+
process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_ADMIN_SECRET ??
|
|
21
27
|
'';
|
|
22
28
|
const tokenAudience = process.env.MCP_SM_TOKEN_AUDIENCE ?? 'orchestration-api';
|
|
23
29
|
if (!clientSecret) {
|
|
24
|
-
throw new Error('MCP SM client secret is required. Set MCP_SM_CLIENT_SECRET or
|
|
30
|
+
throw new Error('MCP SM client secret is required. Set MCP_SM_CLIENT_SECRET or DISTRO_QA_E2E_TESTS_KEYCLOAK_ADMIN_SECRET.');
|
|
25
31
|
}
|
|
26
32
|
return {
|
|
27
|
-
mcpBaseUrl:
|
|
28
|
-
mcpOauthUrl: `${
|
|
33
|
+
mcpBaseUrl: `${origin}${contextPath.replace(/\/+$/, '')}`,
|
|
34
|
+
mcpOauthUrl: `${origin}/auth/realms/camunda-platform/protocol/openid-connect/token`,
|
|
29
35
|
mcpClientId: clientId,
|
|
30
36
|
mcpClientSecret: clientSecret,
|
|
31
37
|
mcpTokenAudience: tokenAudience,
|