mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
ci: Run db tests with a table-prefix as well (no-changelog) (#5818)
This commit is contained in:
parent
0b0024d722
commit
e4796c169b
4
.github/workflows/ci-postgres-mysql.yml
vendored
4
.github/workflows/ci-postgres-mysql.yml
vendored
|
@ -48,6 +48,10 @@ jobs:
|
|||
working-directory: packages/cli
|
||||
run: pnpm test:postgres:alt-schema
|
||||
|
||||
- name: Test Postgres (table prefix)
|
||||
working-directory: packages/cli
|
||||
run: pnpm test:postgres:with-table-prefix
|
||||
|
||||
- name: Notify Slack on failure
|
||||
uses: act10ns/slack@v2.0.0
|
||||
if: failure()
|
||||
|
|
|
@ -36,9 +36,10 @@
|
|||
"swagger": "swagger-cli",
|
||||
"test": "pnpm test:sqlite",
|
||||
"test:sqlite": "N8N_LOG_LEVEL=silent DB_TYPE=sqlite jest",
|
||||
"test:postgres": "N8N_LOG_LEVEL=silent DB_TYPE=postgresdb jest",
|
||||
"test:postgres": "N8N_LOG_LEVEL=silent DB_TYPE=postgresdb jest --no-coverage",
|
||||
"test:postgres:alt-schema": "DB_POSTGRESDB_SCHEMA=alt_schema pnpm test:postgres",
|
||||
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb jest",
|
||||
"test:postgres:with-table-prefix": "DB_TABLE_PREFIX=xyz_ pnpm test:postgres",
|
||||
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb jest --no-coverage",
|
||||
"watch": "concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\"",
|
||||
"typeorm": "ts-node -T ../../node_modules/typeorm/cli.js"
|
||||
},
|
||||
|
|
|
@ -512,7 +512,7 @@ export const getSqliteOptions = ({ name }: { name: string }): ConnectionOptions
|
|||
name,
|
||||
type: 'sqlite',
|
||||
database: ':memory:',
|
||||
entityPrefix: '',
|
||||
entityPrefix: config.getEnv('database.tablePrefix'),
|
||||
dropSchema: true,
|
||||
migrations: sqliteMigrations,
|
||||
migrationsTableName: 'migrations',
|
||||
|
@ -525,6 +525,7 @@ const baseOptions = (type: TestDBType) => ({
|
|||
port: config.getEnv(`database.${type}db.port`),
|
||||
username: config.getEnv(`database.${type}db.user`),
|
||||
password: config.getEnv(`database.${type}db.password`),
|
||||
entityPrefix: config.getEnv('database.tablePrefix'),
|
||||
schema: type === 'postgres' ? config.getEnv('database.postgresdb.schema') : undefined,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue