Skip to content

Commit

Permalink
Merge branch 'release-0101' into SPSH-1378
Browse files Browse the repository at this point in the history
  • Loading branch information
clauyan authored Dec 13, 2024
2 parents c7d33b9 + 7c955d4 commit e846ed6
Show file tree
Hide file tree
Showing 32 changed files with 962 additions and 319 deletions.
5 changes: 4 additions & 1 deletion src/console/console.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { Test, TestingModule } from '@nestjs/testing';
import { ConsoleModule } from './console.module.js';
import { DbConsole } from './db.console.js';
import { DbInitConsole } from './db-init.console.js';
import { LoggingTestModule } from '../../test/utils/index.js';
import { PersonModule } from '../modules/person/person.module.js';
import { KeycloakAdministrationModule } from '../modules/keycloak-administration/keycloak-administration.module.js';

describe('ConsoleModule', () => {
let module: TestingModule;

beforeAll(async () => {
module = await Test.createTestingModule({
imports: [ConsoleModule],
imports: [PersonModule, KeycloakAdministrationModule, ConsoleModule, LoggingTestModule],
}).compile();
});

Expand Down
2 changes: 0 additions & 2 deletions src/console/console.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { DbConsole } from './db.console.js';
import { DbInitConsole } from './db-init.console.js';
import { LoggerModule } from '../core/logging/logger.module.js';
import { KeycloakAdministrationModule } from '../modules/keycloak-administration/keycloak-administration.module.js';
import { UsernameGeneratorService } from '../modules/person/domain/username-generator.service.js';
import { KeycloakConfigModule } from '../modules/keycloak-administration/keycloak-config.module.js';
import { OrganisationModule } from '../modules/organisation/organisation.module.js';
import { RolleModule } from '../modules/rolle/rolle.module.js';
Expand Down Expand Up @@ -93,7 +92,6 @@ import { KeycloakConsoleModule } from './keycloak/keycloak-console.module.js';
DbInitMigrationConsole,
DbCreateMigrationConsole,
DbApplyMigrationConsole,
UsernameGeneratorService,
DbSeedDataGeneratorConsole,
],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { DBiamPersonenkontextService } from '../../modules/personenkontext/domai
import { DbSeedReferenceRepo } from './repo/db-seed-reference.repo.js';
import { PersonenKontextModule } from '../../modules/personenkontext/personenkontext.module.js';
import { LdapClient } from '../../core/ldap/domain/ldap-client.js';
import { OxUserBlacklistRepo } from '../../modules/person/persistence/ox-user-blacklist.repo.js';

describe('DbSeedConsoleMockedDbSeedRepo', () => {
let module: TestingModule;
Expand All @@ -50,6 +51,7 @@ describe('DbSeedConsoleMockedDbSeedRepo', () => {
providers: [
UsernameGeneratorService,
DBiamPersonenkontextRepo,
OxUserBlacklistRepo,
DbSeedConsole,
DbSeedService,
DBiamPersonenkontextService,
Expand Down
3 changes: 2 additions & 1 deletion src/console/dbseed/db-seed.console.integration-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { RolleModule } from '../../modules/rolle/rolle.module.js';
import { ServiceProviderModule } from '../../modules/service-provider/service-provider.module.js';
import { DbSeedModule } from './db-seed.module.js';
import { PersonenKontextModule } from '../../modules/personenkontext/personenkontext.module.js';
import { OxUserBlacklistRepo } from '../../modules/person/persistence/ox-user-blacklist.repo.js';

describe('DbSeedConsoleIntegration', () => {
let module: TestingModule;
Expand All @@ -41,7 +42,7 @@ describe('DbSeedConsoleIntegration', () => {
ServiceProviderModule,
PersonenKontextModule,
],
providers: [UsernameGeneratorService, DBiamPersonenkontextRepo],
providers: [UsernameGeneratorService, DBiamPersonenkontextRepo, OxUserBlacklistRepo],
})
.overrideModule(KeycloakConfigModule)
.useModule(KeycloakConfigTestModule.forRoot({ isKeycloakRequired: true }))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { PersonModule } from '../../../modules/person/person.module.js';
import { DbSeedModule } from '../db-seed.module.js';
import { PersonenKontextModule } from '../../../modules/personenkontext/personenkontext.module.js';
import { VornameForPersonWithTrailingSpaceError } from '../../../modules/person/domain/vorname-with-trailing-space.error.js';
import { OxUserBlacklistRepo } from '../../../modules/person/persistence/ox-user-blacklist.repo.js';

describe('DbSeedServiceIntegration', () => {
let module: TestingModule;
Expand All @@ -42,7 +43,7 @@ describe('DbSeedServiceIntegration', () => {
LoggingTestModule,
PersonenKontextModule,
],
providers: [UsernameGeneratorService, DBiamPersonenkontextRepo],
providers: [UsernameGeneratorService, DBiamPersonenkontextRepo, OxUserBlacklistRepo],
})
.overrideModule(KeycloakConfigModule)
.useModule(KeycloakConfigTestModule.forRoot({ isKeycloakRequired: true }))
Expand Down
2 changes: 2 additions & 0 deletions src/modules/email/persistence/email.repo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { PersonAlreadyHasEnabledEmailAddressError } from '../error/person-alread
import { UserLockRepository } from '../../keycloak-administration/repository/user-lock.repository.js';
import { PersonEmailResponse } from '../../person/api/person-email-response.js';
import { generatePassword } from '../../../shared/util/password-generator.js';
import { OxUserBlacklistRepo } from '../../person/persistence/ox-user-blacklist.repo.js';
import { OrganisationID, PersonID } from '../../../shared/types/aggregate-ids.types.js';

describe('EmailRepo', () => {
Expand All @@ -45,6 +46,7 @@ describe('EmailRepo', () => {
imports: [ConfigTestModule, DatabaseTestModule.forRoot({ isDatabaseRequired: true })],
providers: [
UsernameGeneratorService,
OxUserBlacklistRepo,
EmailRepo,
EmailFactory,
PersonFactory,
Expand Down
Loading

0 comments on commit e846ed6

Please sign in to comment.