-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* implement DomainName and OperationType * modify logging in all modules in KNL usecase * modify task module to new logging in KNL deletion module * Update apps/server/src/modules/account/repo/account.repo.integration.spec.ts Co-authored-by: Bartosz Nowicki <116367402+bn-pass@users.noreply.github.com> * Update apps/server/src/modules/class/service/class.service.ts * Update apps/server/src/modules/pseudonym/repo/pseudonyms.repo.ts * Update apps/server/src/modules/pseudonym/repo/external-tool-pseudonym.repo.ts Co-authored-by: Sergej Hoffmann <97111299+SevenWaysDP@users.noreply.github.com> * fix with task and rocketchat logging * fix tests in deletionUC --------- Co-authored-by: Bartosz Nowicki <116367402+bn-pass@users.noreply.github.com> Co-authored-by: Sergej Hoffmann <97111299+SevenWaysDP@users.noreply.github.com>
- Loading branch information
1 parent
dfcfc9e
commit 01f4185
Showing
80 changed files
with
1,318 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 15 additions & 9 deletions
24
apps/server/src/modules/deletion/builder/deletion-log-statistic.builder.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
import { DomainModel } from '@shared/domain/types'; | ||
import { DomainName, OperationType } from '@shared/domain/types'; | ||
import { ObjectId } from 'bson'; | ||
import { DeletionLogStatisticBuilder } from '.'; | ||
|
||
describe(DeletionLogStatisticBuilder.name, () => { | ||
afterAll(() => { | ||
jest.clearAllMocks(); | ||
}); | ||
const setup = () => { | ||
const domain = DomainName.PSEUDONYMS; | ||
const operation = OperationType.DELETE; | ||
const count = 2; | ||
const refs = [new ObjectId().toHexString(), new ObjectId().toHexString()]; | ||
|
||
return { domain, operation, count, refs }; | ||
}; | ||
|
||
it('should build generic deletionLogStatistic with all attributes', () => { | ||
// Arrange | ||
const domain = DomainModel.PSEUDONYMS; | ||
const modifiedCount = 0; | ||
const deletedCount = 2; | ||
const { domain, operation, count, refs } = setup(); | ||
|
||
const result = DeletionLogStatisticBuilder.build(domain, modifiedCount, deletedCount); | ||
const result = DeletionLogStatisticBuilder.build(domain, operation, count, refs); | ||
|
||
// Assert | ||
expect(result.domain).toEqual(domain); | ||
expect(result.modifiedCount).toEqual(modifiedCount); | ||
expect(result.deletedCount).toEqual(deletedCount); | ||
expect(result.operation).toEqual(operation); | ||
expect(result.count).toEqual(count); | ||
expect(result.refs).toEqual(refs); | ||
}); | ||
}); |
12 changes: 3 additions & 9 deletions
12
apps/server/src/modules/deletion/builder/deletion-log-statistic.builder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/server/src/modules/deletion/builder/deletion-request-body-props.builder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.