🧪 Truncate mapping tables

This commit is contained in:
Iván Ovejero
2022-06-30 13:43:50 +02:00
parent 86b3cc6e15
commit de55fdb625
4 changed files with 103 additions and 19 deletions

View File

@@ -48,6 +48,17 @@ export const ROUTES_REQUIRING_AUTHORIZATION: Readonly<string[]> = [
'POST /owner/skip-setup',
];
/**
* Mapping tables link entities but, unlike `SharedWorkflow` and `SharedCredentials`,
* have no entity representation. Therefore, mapping tables must be cleared
* on truncation of any of the collections they link.
*/
export const MAPPING_TABLES_TO_CLEAR: Record<string, string[] | undefined> = {
Workflow: ['workflows_tags'],
Tag: ['workflows_tags'],
};
/**
* Name of the connection used for creating and dropping a Postgres DB
* for each suite test run.
@@ -64,3 +75,10 @@ export const BOOTSTRAP_MYSQL_CONNECTION_NAME: Readonly<string> = 'n8n_bs_mysql';
* Timeout (in milliseconds) to account for fake SMTP service being slow to respond.
*/
export const SMTP_TEST_TIMEOUT = 30_000;
/**
* Mapping tables having no entity representation.
*/
export const MAPPING_TABLES = {
WorkflowsTags: 'workflows_tags',
} as const;