mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
refactor: Overhaul nodes-testing setup - Part 2 (no-changelog) (#14873)
This commit is contained in:
committed by
GitHub
parent
897338bd24
commit
91069f057e
@@ -1,28 +1,17 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import {
|
||||
getWorkflowFilenames,
|
||||
initBinaryDataService,
|
||||
testWorkflows,
|
||||
} from '../../../../../test/nodes/Helpers';
|
||||
import { getWorkflowFilenames, testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../credentials';
|
||||
|
||||
describe('Azure Cosmos DB - Create Container', () => {
|
||||
const workflows = getWorkflowFilenames(__dirname).filter((filename) =>
|
||||
filename.includes('create.workflow.json'),
|
||||
);
|
||||
|
||||
beforeAll(async () => {
|
||||
await initBinaryDataService();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
if (!nock.isActive()) {
|
||||
nock.activate();
|
||||
}
|
||||
const { baseUrl } = credentials.microsoftAzureCosmosDbSharedKeyApi;
|
||||
|
||||
const baseUrl = 'https://n8n-us-east-account.documents.azure.com/dbs/database_1';
|
||||
|
||||
nock.cleanAll();
|
||||
nock(baseUrl)
|
||||
.persist()
|
||||
.defaultReplyHeaders({ 'Content-Type': 'application/json' })
|
||||
@@ -86,9 +75,5 @@ describe('Azure Cosmos DB - Create Container', () => {
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
nock.cleanAll();
|
||||
});
|
||||
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user