Skip to content

Commit

Permalink
SPSH-698: Fixed KC issues
Browse files Browse the repository at this point in the history
  • Loading branch information
phaelcg committed Jul 8, 2024
1 parent 4e41bf2 commit 31507de
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import request, { Response } from 'supertest';
import { App } from 'supertest/types.js';
import {
ConfigTestModule,
DEFAULT_TIMEOUT_FOR_TESTCONTAINERS,
DatabaseTestModule,
DoFactory,
KeycloakConfigTestModule,
MapperTestModule,
} from '../../../../test/utils/index.js';
import { GlobalValidationPipe } from '../../../shared/validation/index.js';
Expand Down Expand Up @@ -45,6 +45,8 @@ import { PersonenkontextWorkflowAggregate } from '../domain/personenkontext-work
import { PersonenkontextWorkflowFactory } from '../domain/personenkontext-workflow.factory.js';
import { FindDbiamPersonenkontextWorkflowBodyParams } from './param/dbiam-find-personenkontextworkflow-body.params.js';
import { OrganisationsTyp } from '../../organisation/domain/organisation.enums.js';
import { KeycloakAdministrationModule } from '../../keycloak-administration/keycloak-administration.module.js';
import { KeycloakConfigModule } from '../../keycloak-administration/keycloak-config.module.js';

function createRolle(this: void, rolleFactory: RolleFactory, params: Partial<Rolle<boolean>> = {}): Rolle<false> {
const rolle: Rolle<false> = rolleFactory.createNew(
Expand Down Expand Up @@ -101,6 +103,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
DatabaseTestModule.forRoot({ isDatabaseRequired: true }),
PersonenKontextApiModule,
PersonModule,
KeycloakAdministrationModule,
],
providers: [
RolleFactory,
Expand Down Expand Up @@ -163,7 +166,10 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
},
},
],
}).compile();
})
.overrideModule(KeycloakConfigModule)
.useModule(KeycloakConfigTestModule.forRoot({ isKeycloakRequired: true }))
.compile();

orm = module.get(MikroORM);
organisationRepo = module.get(OrganisationRepo);
Expand All @@ -179,7 +185,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
await DatabaseTestModule.setupDatabase(orm);
app = module.createNestApplication();
await app.init();
}, DEFAULT_TIMEOUT_FOR_TESTCONTAINERS);
}, 10000000);

afterAll(async () => {
await orm.close();
Expand Down

0 comments on commit 31507de

Please sign in to comment.