test(core): Fix cleanup in test teardown script (no-changelog) (#8361)

This commit is contained in:
Iván Ovejero 2024-01-17 14:01:56 +01:00 committed by GitHub
parent d5455d7acc
commit 771d2fa341
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -14,7 +14,6 @@ if (inE2ETests) {
process.env.N8N_AI_ENABLED = 'true'; process.env.N8N_AI_ENABLED = 'true';
} else if (inTest) { } else if (inTest) {
process.env.N8N_LOG_LEVEL = 'silent'; process.env.N8N_LOG_LEVEL = 'silent';
process.env.N8N_ENCRYPTION_KEY = 'test_key';
process.env.N8N_PUBLIC_API_DISABLED = 'true'; process.env.N8N_PUBLIC_API_DISABLED = 'true';
process.env.SKIP_STATISTICS_EVENTS = 'true'; process.env.SKIP_STATISTICS_EVENTS = 'true';
} else { } else {

View file

@ -2,6 +2,8 @@ import { tmpdir } from 'os';
import { join } from 'path'; import { join } from 'path';
import { mkdirSync, mkdtempSync, writeFileSync } from 'fs'; import { mkdirSync, mkdtempSync, writeFileSync } from 'fs';
process.env.N8N_ENCRYPTION_KEY = 'test_key';
const baseDir = join(tmpdir(), 'n8n-tests/'); const baseDir = join(tmpdir(), 'n8n-tests/');
mkdirSync(baseDir, { recursive: true }); mkdirSync(baseDir, { recursive: true });