mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
test: Configures integration tests to run in src (#19640)
This commit is contained in:
8
.github/docker-compose.yml
vendored
8
.github/docker-compose.yml
vendored
@@ -9,10 +9,6 @@ services:
|
|||||||
- 3306:3306
|
- 3306:3306
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /var/lib/mysql
|
- /var/lib/mysql
|
||||||
command: >
|
|
||||||
--wait-timeout=300
|
|
||||||
--interactive-timeout=300
|
|
||||||
--max-connections=200
|
|
||||||
|
|
||||||
mysql-8.4:
|
mysql-8.4:
|
||||||
image: mysql:8.4
|
image: mysql:8.4
|
||||||
@@ -23,10 +19,6 @@ services:
|
|||||||
- 3306:3306
|
- 3306:3306
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /var/lib/mysql
|
- /var/lib/mysql
|
||||||
command: >
|
|
||||||
--wait-timeout=300
|
|
||||||
--interactive-timeout=300
|
|
||||||
--max-connections=200
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
|
|||||||
3
.github/workflows/ci-postgres-mysql.yml
vendored
3
.github/workflows/ci-postgres-mysql.yml
vendored
@@ -66,6 +66,7 @@ jobs:
|
|||||||
DB_MYSQLDB_CONNECTION_TIMEOUT: 120000
|
DB_MYSQLDB_CONNECTION_TIMEOUT: 120000
|
||||||
DB_MYSQLDB_ACQUIRE_TIMEOUT: 120000
|
DB_MYSQLDB_ACQUIRE_TIMEOUT: 120000
|
||||||
DB_MYSQLDB_TIMEOUT: 120000
|
DB_MYSQLDB_TIMEOUT: 120000
|
||||||
|
NODE_OPTIONS: '--max-old-space-size=7168'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ jobs:
|
|||||||
mysql:
|
mysql:
|
||||||
name: MySQL 8.4
|
name: MySQL 8.4
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: blacksmith-2vcpu-ubuntu-2204
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
env:
|
env:
|
||||||
DB_MYSQLDB_PASSWORD: password
|
DB_MYSQLDB_PASSWORD: password
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ module.exports = {
|
|||||||
coveragePathIgnorePatterns: ['/src/databases/migrations/'],
|
coveragePathIgnorePatterns: ['/src/databases/migrations/'],
|
||||||
testTimeout: 10_000,
|
testTimeout: 10_000,
|
||||||
prettierPath: null,
|
prettierPath: null,
|
||||||
// Only run integration tests - exclude unit tests in src/
|
// Run integration tests from both test/integration and src/ directories
|
||||||
testPathIgnorePatterns: ['/dist/', '/node_modules/', '/src/'],
|
testRegex: undefined, // Override base config testRegex
|
||||||
|
testMatch: ['<rootDir>/test/integration/**/*.test.ts', '<rootDir>/src/**/*.integration.test.ts'],
|
||||||
|
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"test:sqlite": "N8N_LOG_LEVEL=silent DB_TYPE=sqlite jest --config=jest.config.integration.js --no-coverage",
|
"test:sqlite": "N8N_LOG_LEVEL=silent DB_TYPE=sqlite jest --config=jest.config.integration.js --no-coverage",
|
||||||
"test:postgres": "N8N_LOG_LEVEL=silent DB_TYPE=postgresdb DB_POSTGRESDB_SCHEMA=alt_schema DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
|
"test:postgres": "N8N_LOG_LEVEL=silent DB_TYPE=postgresdb DB_POSTGRESDB_SCHEMA=alt_schema DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
|
||||||
"test:mariadb": "N8N_LOG_LEVEL=silent DB_TYPE=mariadb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
|
"test:mariadb": "N8N_LOG_LEVEL=silent DB_TYPE=mariadb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
|
||||||
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
|
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage --maxWorkers=1",
|
||||||
"test:win": "pnpm test:sqlite:win",
|
"test:win": "pnpm test:sqlite:win",
|
||||||
"test:dev:win": "set N8N_LOG_LEVEL=silent&& set DB_TYPE=sqlite&& jest --watch",
|
"test:dev:win": "set N8N_LOG_LEVEL=silent&& set DB_TYPE=sqlite&& jest --watch",
|
||||||
"test:sqlite:win": "set N8N_LOG_LEVEL=silent&& set DB_TYPE=sqlite&& jest --config=jest.config.integration.js",
|
"test:sqlite:win": "set N8N_LOG_LEVEL=silent&& set DB_TYPE=sqlite&& jest --config=jest.config.integration.js",
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ describe('dataStore', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
// Clean up any created user data stores
|
|
||||||
await dataStoreService.deleteDataStoreAll();
|
await dataStoreService.deleteDataStoreAll();
|
||||||
});
|
});
|
||||||
|
|
||||||
Reference in New Issue
Block a user