ci: Refactor cli tests to speed up CI (no-changelog) (#5718)

* ci: Refactor cli tests to speed up CI (no-changelog)

* upgrade jest to address memory leaks
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-17 17:24:05 +01:00
committed by GitHub
parent be172cb720
commit 6242cac53b
29 changed files with 4229 additions and 4762 deletions

View File

@@ -9,13 +9,11 @@ import set from 'lodash.set';
import { BinaryDataManager, UserSettings } from 'n8n-core';
import {
ICredentialType,
ICredentialTypes,
IDataObject,
IExecuteFunctions,
INode,
INodeExecutionData,
INodeParameters,
INodesAndCredentials,
ITriggerFunctions,
ITriggerResponse,
LoggerProxy,
@@ -90,13 +88,6 @@ export const mockInstance = <T>(
return instance;
};
const loadNodesAndCredentials: INodesAndCredentials = {
loaded: { nodes: {}, credentials: {} },
known: { nodes: {}, credentials: {} },
credentialTypes: {} as ICredentialTypes,
};
Container.set(LoadNodesAndCredentials, loadNodesAndCredentials);
/**
* Initialize a test server.
*/
@@ -740,6 +731,15 @@ export async function isInstanceOwnerSetUp() {
return Boolean(value);
}
export const setInstanceOwnerSetUp = async (value: boolean) => {
config.set('userManagement.isInstanceOwnerSetUp', value);
await Db.collections.Settings.update(
{ key: 'userManagement.isInstanceOwnerSetUp' },
{ value: JSON.stringify(value) },
);
};
// ----------------------------------
// misc
// ----------------------------------