Skip to content

Commit

Permalink
ci: Remove unused WaitTracker mocking (no-changelog) (#9694)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy authored Jun 11, 2024
1 parent 50bd5b9 commit 6ba789a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions packages/cli/test/integration/commands/ldap/reset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { Push } from '@/push';
import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository';
import { createTeamProject, findProject, getPersonalProject } from '../../shared/db/projects';
import { WaitTracker } from '@/WaitTracker';
import { getLdapSynchronizations, saveLdapSynchronization } from '@/Ldap/helpers';
import { createLdapConfig } from '../../shared/ldap';
import { LdapService } from '@/Ldap/ldap.service';
Expand All @@ -40,9 +39,6 @@ beforeAll(async () => {
mockInstance(Push);
mockInstance(InternalHooks);
mockInstance(LoadNodesAndCredentials);
// This needs to be mocked, otherwise the time setInterval would prevent jest
// from exiting properly.
mockInstance(WaitTracker);
await testDb.init();
await oclifConfig.load();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@ import config from '@/config';
import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee';
import { SourceControlService } from '@/environments/sourceControl/sourceControl.service.ee';
import type { SourceControlledFile } from '@/environments/sourceControl/types/sourceControlledFile';
import { WaitTracker } from '@/WaitTracker';

import * as utils from '../shared/utils/';
import { createUser } from '../shared/db/users';
import { mockInstance } from '../../shared/mocking';
import type { SuperAgentTest } from '../shared/types';

let authOwnerAgent: SuperAgentTest;
let owner: User;

// This is necessary for the tests to shutdown cleanly.
mockInstance(WaitTracker);

const testServer = utils.setupTestServer({
endpointGroups: ['sourceControl', 'license', 'auth'],
enabledFeatures: ['feat:sourceControl', 'feat:sharing'],
Expand Down
5 changes: 0 additions & 5 deletions packages/cli/test/integration/executions.controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ import { createMember, createOwner } from './shared/db/users';
import { createWorkflow, shareWorkflowWithUsers } from './shared/db/workflows';
import * as testDb from './shared/testDb';
import { setupTestServer } from './shared/utils';
import { mockInstance } from '../shared/mocking';
import { WaitTracker } from '@/WaitTracker';
import { createTeamProject, linkUserToProject } from './shared/db/projects';

const testServer = setupTestServer({ endpointGroups: ['executions'] });

let owner: User;
let member: User;

// This is necessary for the tests to shutdown cleanly.
mockInstance(WaitTracker);

const saveExecution = async ({ belongingTo }: { belongingTo: User }) => {
const workflow = await createWorkflow({}, belongingTo);
return await createSuccessfulExecution(workflow);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import * as testDb from '../shared/testDb';
import { createUser } from '../shared/db/users';
import { createWorkflowWithTrigger } from '../shared/db/workflows';
import { createTeamProject } from '../shared/db/projects';
import { mockInstance } from '../../shared/mocking';
import { WaitTracker } from '@/WaitTracker';

let member: User;
let anotherMember: User;
Expand All @@ -16,9 +14,6 @@ const testServer = utils.setupTestServer({
enabledFeatures: ['feat:sharing', 'feat:advancedPermissions'],
});

// This is necessary for the tests to shutdown cleanly.
mockInstance(WaitTracker);

beforeAll(async () => {
member = await createUser({ role: 'global:member' });
anotherMember = await createUser({ role: 'global:member' });
Expand Down

0 comments on commit 6ba789a

Please sign in to comment.