mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🧪 Fix CI/CD for /oauth2-credential
tests (#3230)
This commit is contained in:
parent
7faac85002
commit
364976db38
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "n8n",
|
"name": "n8n",
|
||||||
"version": "0.174.0",
|
"version": "0.175.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "n8n",
|
"name": "n8n",
|
||||||
"version": "0.174.0",
|
"version": "0.175.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.14.6",
|
"@babel/core": "^7.14.6",
|
||||||
"@fontsource/open-sans": "^4.5.0",
|
"@fontsource/open-sans": "^4.5.0",
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { RESPONSE_ERROR_MESSAGES } from '../../src/constants';
|
||||||
|
|
||||||
import type { Role } from '../../src/databases/entities/Role';
|
import type { Role } from '../../src/databases/entities/Role';
|
||||||
import { CredentialTypes, LoadNodesAndCredentials } from '../../src';
|
import { CredentialTypes, LoadNodesAndCredentials } from '../../src';
|
||||||
|
import { LOAD_NODES_AND_CREDS_TEST_TIMEOUT } from './shared/constants';
|
||||||
|
|
||||||
const SCOPES_ENDPOINT = '/oauth2-credential/scopes';
|
const SCOPES_ENDPOINT = '/oauth2-credential/scopes';
|
||||||
|
|
||||||
|
@ -14,7 +15,10 @@ let testDbName = '';
|
||||||
let globalOwnerRole: Role;
|
let globalOwnerRole: Role;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
app = utils.initTestServer({ endpointGroups: ['oauth2-credential'], applyAuth: true });
|
app = utils.initTestServer({
|
||||||
|
endpointGroups: ['oauth2-credential'],
|
||||||
|
applyAuth: true,
|
||||||
|
});
|
||||||
const initResult = await testDb.init();
|
const initResult = await testDb.init();
|
||||||
testDbName = initResult.testDbName;
|
testDbName = initResult.testDbName;
|
||||||
|
|
||||||
|
@ -28,7 +32,7 @@ beforeAll(async () => {
|
||||||
|
|
||||||
const credentialTypes = CredentialTypes();
|
const credentialTypes = CredentialTypes();
|
||||||
await credentialTypes.init(loadNodesAndCredentials.credentialTypes);
|
await credentialTypes.init(loadNodesAndCredentials.credentialTypes);
|
||||||
});
|
}, LOAD_NODES_AND_CREDS_TEST_TIMEOUT);
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await testDb.terminate(testDbName);
|
await testDb.terminate(testDbName);
|
||||||
|
|
|
@ -62,3 +62,8 @@ export const BOOTSTRAP_MYSQL_CONNECTION_NAME: Readonly<string> = 'n8n_bs_mysql';
|
||||||
* Timeout (in milliseconds) to account for fake SMTP service being slow to respond.
|
* Timeout (in milliseconds) to account for fake SMTP service being slow to respond.
|
||||||
*/
|
*/
|
||||||
export const SMTP_TEST_TIMEOUT = 30_000;
|
export const SMTP_TEST_TIMEOUT = 30_000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timeout (in milliseconds) to account for `LoadNodesAndCredentials()` being slow to run on CI/CD server.
|
||||||
|
*/
|
||||||
|
export const LOAD_NODES_AND_CREDS_TEST_TIMEOUT = 30_000;
|
||||||
|
|
Loading…
Reference in a new issue