mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Standardize filename casing for services and Public API (no-changelog) (#10579)
This commit is contained in:
@@ -3,9 +3,9 @@ import { nanoid } from 'nanoid';
|
||||
import { ImportCredentialsCommand } from '@/commands/import/credentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import * as testDb from '../shared/testDb';
|
||||
import * as testDb from '../shared/test-db';
|
||||
import { getAllCredentials, getAllSharedCredentials } from '../shared/db/credentials';
|
||||
import { createMember, createOwner } from '../shared/db/users';
|
||||
import { getPersonalProject } from '../shared/db/projects';
|
||||
@@ -27,7 +27,7 @@ test('import:credentials should import a credential', async () => {
|
||||
//
|
||||
// ACT
|
||||
//
|
||||
await command.run(['--input=./test/integration/commands/importCredentials/credentials.json']);
|
||||
await command.run(['--input=./test/integration/commands/import-credentials/credentials.json']);
|
||||
|
||||
//
|
||||
// ASSERT
|
||||
@@ -61,7 +61,7 @@ test('import:credentials should import a credential from separated files', async
|
||||
// import credential the first time, assigning it to the owner
|
||||
await command.run([
|
||||
'--separate',
|
||||
'--input=./test/integration/commands/importCredentials/separate',
|
||||
'--input=./test/integration/commands/import-credentials/separate',
|
||||
]);
|
||||
|
||||
//
|
||||
@@ -99,7 +99,7 @@ test('`import:credentials --userId ...` should fail if the credential exists alr
|
||||
|
||||
// import credential the first time, assigning it to the owner
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials.json',
|
||||
`--userId=${owner.id}`,
|
||||
]);
|
||||
|
||||
@@ -127,7 +127,7 @@ test('`import:credentials --userId ...` should fail if the credential exists alr
|
||||
// credential to another user.
|
||||
await expect(
|
||||
command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials-updated.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials-updated.json',
|
||||
`--userId=${member.id}`,
|
||||
]),
|
||||
).rejects.toThrowError(
|
||||
@@ -170,7 +170,7 @@ test("only update credential, don't create or update owner if neither `--userId`
|
||||
|
||||
// import credential the first time, assigning it to a member
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials.json',
|
||||
`--userId=${member.id}`,
|
||||
]);
|
||||
|
||||
@@ -195,7 +195,7 @@ test("only update credential, don't create or update owner if neither `--userId`
|
||||
//
|
||||
// Import again only updating the name and omitting `--userId`
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials-updated.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials-updated.json',
|
||||
]);
|
||||
|
||||
//
|
||||
@@ -235,7 +235,7 @@ test('`import:credential --projectId ...` should fail if the credential already
|
||||
|
||||
// import credential the first time, assigning it to the owner
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials.json',
|
||||
`--userId=${owner.id}`,
|
||||
]);
|
||||
|
||||
@@ -263,7 +263,7 @@ test('`import:credential --projectId ...` should fail if the credential already
|
||||
// credential to another user.
|
||||
await expect(
|
||||
command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials-updated.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials-updated.json',
|
||||
`--projectId=${memberProject.id}`,
|
||||
]),
|
||||
).rejects.toThrowError(
|
||||
@@ -299,7 +299,7 @@ test('`import:credential --projectId ...` should fail if the credential already
|
||||
test('`import:credential --projectId ... --userId ...` fails explaining that only one of the options can be used at a time', async () => {
|
||||
await expect(
|
||||
command.run([
|
||||
'--input=./test/integration/commands/importCredentials/credentials-updated.json',
|
||||
'--input=./test/integration/commands/import-credentials/credentials-updated.json',
|
||||
`--projectId=${nanoid()}`,
|
||||
`--userId=${nanoid()}`,
|
||||
]),
|
||||
|
||||
@@ -3,9 +3,9 @@ import { nanoid } from 'nanoid';
|
||||
import { ImportWorkflowsCommand } from '@/commands/import/workflow';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import * as testDb from '../shared/testDb';
|
||||
import * as testDb from '../shared/test-db';
|
||||
import { getAllSharedWorkflows, getAllWorkflows } from '../shared/db/workflows';
|
||||
import { createMember, createOwner } from '../shared/db/users';
|
||||
import { getPersonalProject } from '../shared/db/projects';
|
||||
@@ -27,7 +27,10 @@ test('import:workflow should import active workflow and deactivate it', async ()
|
||||
//
|
||||
// ACT
|
||||
//
|
||||
await command.run(['--separate', '--input=./test/integration/commands/importWorkflows/separate']);
|
||||
await command.run([
|
||||
'--separate',
|
||||
'--input=./test/integration/commands/import-workflows/separate',
|
||||
]);
|
||||
|
||||
//
|
||||
// ASSERT
|
||||
@@ -66,7 +69,9 @@ test('import:workflow should import active workflow from combined file and deact
|
||||
//
|
||||
// ACT
|
||||
//
|
||||
await command.run(['--input=./test/integration/commands/importWorkflows/combined/combined.json']);
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/import-workflows/combined/combined.json',
|
||||
]);
|
||||
|
||||
//
|
||||
// ASSERT
|
||||
@@ -105,7 +110,7 @@ test('`import:workflow --userId ...` should fail if the workflow exists already
|
||||
|
||||
// Import workflow the first time, assigning it to a member.
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/original.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/original.json',
|
||||
`--userId=${owner.id}`,
|
||||
]);
|
||||
|
||||
@@ -132,7 +137,7 @@ test('`import:workflow --userId ...` should fail if the workflow exists already
|
||||
// to assign it to the member.
|
||||
await expect(
|
||||
command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/updated.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/updated.json',
|
||||
`--userId=${member.id}`,
|
||||
]),
|
||||
).rejects.toThrowError(
|
||||
@@ -169,7 +174,7 @@ test("only update the workflow, don't create or update the owner if `--userId` i
|
||||
|
||||
// Import workflow the first time, assigning it to a member.
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/original.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/original.json',
|
||||
`--userId=${member.id}`,
|
||||
]);
|
||||
|
||||
@@ -194,7 +199,7 @@ test("only update the workflow, don't create or update the owner if `--userId` i
|
||||
//
|
||||
// Import the same workflow again, with another name but the same ID.
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/updated.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/updated.json',
|
||||
]);
|
||||
|
||||
//
|
||||
@@ -228,7 +233,7 @@ test('`import:workflow --projectId ...` should fail if the credential already ex
|
||||
|
||||
// Import workflow the first time, assigning it to a member.
|
||||
await command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/original.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/original.json',
|
||||
`--userId=${owner.id}`,
|
||||
]);
|
||||
|
||||
@@ -255,7 +260,7 @@ test('`import:workflow --projectId ...` should fail if the credential already ex
|
||||
// to assign it to the member.
|
||||
await expect(
|
||||
command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/updated.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/updated.json',
|
||||
`--projectId=${memberProject.id}`,
|
||||
]),
|
||||
).rejects.toThrowError(
|
||||
@@ -285,7 +290,7 @@ test('`import:workflow --projectId ...` should fail if the credential already ex
|
||||
test('`import:workflow --projectId ... --userId ...` fails explaining that only one of the options can be used at a time', async () => {
|
||||
await expect(
|
||||
command.run([
|
||||
'--input=./test/integration/commands/importWorkflows/combined-with-update/updated.json',
|
||||
'--input=./test/integration/commands/import-workflows/combined-with-update/updated.json',
|
||||
`--userId=${nanoid()}`,
|
||||
`--projectId=${nanoid()}`,
|
||||
]),
|
||||
|
||||
@@ -13,7 +13,7 @@ import { LdapService } from '@/ldap/ldap.service.ee';
|
||||
import { Push } from '@/push';
|
||||
import { Telemetry } from '@/telemetry';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import { mockInstance } from '../../../shared/mocking';
|
||||
import { createLdapUser, createMember, getUserById } from '../../shared/db/users';
|
||||
import { createWorkflow } from '../../shared/db/workflows';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { License } from '@/license';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { ClearLicenseCommand } from '@/commands/license/clear';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
|
||||
mockInstance(LoadNodesAndCredentials);
|
||||
|
||||
@@ -10,9 +10,9 @@ import { CredentialsEntity } from '@/databases/entities/credentials-entity';
|
||||
import { SettingsRepository } from '@/databases/repositories/settings.repository';
|
||||
import { UserRepository } from '@/databases/repositories/user.repository';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import * as testDb from '../shared/testDb';
|
||||
import * as testDb from '../shared/test-db';
|
||||
import { createMember, createUser } from '../shared/db/users';
|
||||
import { createWorkflow } from '../shared/db/workflows';
|
||||
import { getPersonalProject } from '../shared/db/projects';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { UpdateWorkflowCommand } from '@/commands/update/workflow';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import * as testDb from '../../shared/testDb';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import * as testDb from '../../shared/test-db';
|
||||
import { createWorkflowWithTrigger, getAllWorkflows } from '../../shared/db/workflows';
|
||||
import { mockInstance } from '../../../shared/mocking';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import { License } from '@/license';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { ScalingService } from '@/scaling/scaling.service';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { setupTestCommand } from '@test-integration/utils/test-command';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import { LogStreamingEventRelay } from '@/events/log-streaming-event-relay';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user