fix(tests): use N8N_API_URL consistently in CI and local environments

The integration tests were using N8N_URL for CI but N8N_API_URL for local
development, causing CI failures. Changed CI to use N8N_API_URL to match
the GitHub secrets configuration and local .env setup.

Fixes: Integration tests failing in CI with 'N8N_URL: MISSING' error
This commit is contained in:
czlonkowski
2025-10-04 09:49:28 +02:00
parent 9e1a4129c0
commit 9b94e3be9c

View File

@@ -40,13 +40,13 @@ export interface N8nTestCredentials {
export function getN8nCredentials(): N8nTestCredentials { export function getN8nCredentials(): N8nTestCredentials {
if (process.env.CI) { if (process.env.CI) {
// CI: Use GitHub secrets - validate required variables first // CI: Use GitHub secrets - validate required variables first
const url = process.env.N8N_URL; const url = process.env.N8N_API_URL;
const apiKey = process.env.N8N_API_KEY; const apiKey = process.env.N8N_API_KEY;
if (!url || !apiKey) { if (!url || !apiKey) {
throw new Error( throw new Error(
'Missing required CI credentials:\n' + 'Missing required CI credentials:\n' +
` N8N_URL: ${url ? 'set' : 'MISSING'}\n` + ` N8N_API_URL: ${url ? 'set' : 'MISSING'}\n` +
` N8N_API_KEY: ${apiKey ? 'set' : 'MISSING'}\n` + ` N8N_API_KEY: ${apiKey ? 'set' : 'MISSING'}\n` +
'Please configure GitHub secrets for integration tests.' 'Please configure GitHub secrets for integration tests.'
); );