mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move first batch of repositories to @n8n/db (#15130)
This commit is contained in:
@@ -14,7 +14,7 @@ mockInstance(LoadNodesAndCredentials);
|
||||
const command = setupTestCommand(ImportCredentialsCommand);
|
||||
|
||||
beforeEach(async () => {
|
||||
await testDb.truncate(['Credentials', 'SharedCredentials', 'User']);
|
||||
await testDb.truncate(['CredentialsEntity', 'SharedCredentials', 'User']);
|
||||
});
|
||||
|
||||
test('import:credentials should import a credential', async () => {
|
||||
|
||||
@@ -14,7 +14,7 @@ mockInstance(LoadNodesAndCredentials);
|
||||
const command = setupTestCommand(ImportWorkflowsCommand);
|
||||
|
||||
beforeEach(async () => {
|
||||
await testDb.truncate(['Workflow', 'SharedWorkflow', 'User']);
|
||||
await testDb.truncate(['WorkflowEntity', 'SharedWorkflow', 'User']);
|
||||
});
|
||||
|
||||
test('import:workflow should import active workflow and deactivate it', async () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CredentialsRepository } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
import { EntityNotFoundError } from '@n8n/typeorm';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { Reset } from '@/commands/ldap/reset';
|
||||
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
|
||||
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
|
||||
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { CredentialsEntity } from '@n8n/db';
|
||||
import { CredentialsRepository } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
|
||||
import { Reset } from '@/commands/user-management/reset';
|
||||
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
|
||||
import { SettingsRepository } from '@/databases/repositories/settings.repository';
|
||||
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
|
||||
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
|
||||
|
||||
@@ -10,7 +10,7 @@ mockInstance(LoadNodesAndCredentials);
|
||||
const command = setupTestCommand(UpdateWorkflowCommand);
|
||||
|
||||
beforeEach(async () => {
|
||||
await testDb.truncate(['Workflow']);
|
||||
await testDb.truncate(['WorkflowEntity']);
|
||||
});
|
||||
|
||||
test('update:workflow can activate all workflows', async () => {
|
||||
|
||||
Reference in New Issue
Block a user