mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
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:
@@ -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.'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user