-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperationManagement.spec.ts
More file actions
561 lines (433 loc) · 25.6 KB
/
Copy pathoperationManagement.spec.ts
File metadata and controls
561 lines (433 loc) · 25.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
import MatriculationData from "@/api/api_models/matriculation_management/MatriculationData";
import SubjectMatriculation from "@/api/api_models/matriculation_management/SubjectMatriculation";
import { OperationStatus } from "@/api/api_models/operation_management/OperationState";
import Admin from "@/api/api_models/user_management/Admin";
import Student from "@/api/api_models/user_management/Student";
import CertificateManagement from "@/api/CertificateManagement";
import { UC4Identifier } from "@/api/helpers/UC4Identifier";
import OperationManagement from "@/api/OperationManagement";
import UserManagement from "@/api/UserManagement";
import { Account } from "@/entities/Account";
import { Role } from "@/entities/Role";
import { arrayBufferToBase64, createCSR, createKeyPair, deriveKeyFromPassword, wrapKey } from "@/use/crypto/certificates";
import { readFileSync } from "fs";
import { isEqual } from "lodash";
import MachineUserAuthenticationManagement from "../../helper/MachineUserAuthenticationManagement";
import { getRandomizedUserAndAuthUser } from "../../helper/Users";
import resetState from "../../helper/ResetState";
import MatriculationManagement from "@/api/MatriculationManagement";
import executeTransaction from "@/api/contracts/ChaincodeUtility";
import { GeneralMatriculationTransactionWrapper } from "@/api/contracts/matriculation/transactions/GeneralMatriculationTransactionWrapper";
import { ApproveOperationTransaction } from "@/api/contracts/operation/transactions/ApproveOperation";
import { RejectOperationTransaction } from "@/api/contracts/operation/transactions/RejectOperation";
import ReportManagement from "@/api/ReportManagement";
jest.setTimeout(60000);
const adminAuth = JSON.parse(readFileSync("tests/fixtures/logins/admin.json", "utf-8")) as {
username: string;
password: string;
};
let enrollmentIdStudent = "";
let enrollmentIdStudent2 = "";
let enrollmentIdAdmin = "";
const iv = window.crypto.getRandomValues(new Uint8Array(12));
const encryptionPassword = "My-Super-Password";
const student = getRandomizedUserAndAuthUser(Role.STUDENT) as { governmentId: string; authUser: Account; student: Student };
const student2 = getRandomizedUserAndAuthUser(Role.STUDENT) as { governmentId: string; authUser: Account; student: Student };
const admin = getRandomizedUserAndAuthUser(Role.ADMIN) as { governmentId: string; authUser: Account; admin: Admin };
const governmentId = student.governmentId;
let keypair = {} as CryptoKeyPair;
let certManagement: CertificateManagement;
const protoURL = "public/hlf-proto.json";
const EXAM_REG_1 = "Bachelor Computer Science v3";
let matriculationToApprove: SubjectMatriculation[];
let matriculationToReject: SubjectMatriculation[];
let matriculationToApproveWithDifferentStudent: SubjectMatriculation[];
let operationIdToApprove: string;
let operationIdToReject: string;
let operationIdToApproveWithDifferentStudent: string;
const rejectionReason = "Some reason";
describe("Operation Management tests", () => {
beforeAll(async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(adminAuth);
keypair = await createKeyPair();
expect(success.returnValue.login).not.toEqual("");
const userManagement = new UserManagement();
const success2 = await userManagement.createUser(governmentId, student.authUser, student.student);
expect(success2.returnValue).toBe(true);
const success3 = await userManagement.createUser(student2.governmentId, student2.authUser, student2.student);
expect(success3.returnValue).toBe(true);
const success4 = await userManagement.createUser(admin.governmentId, admin.authUser, admin.admin);
expect(success4.returnValue).toBe(true);
await new Promise((r) => setTimeout(r, 25000));
});
test("Login as student", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(student.authUser);
expect(success.returnValue.login).not.toEqual("");
certManagement = new CertificateManagement();
});
test("Fetch enrollmentId", async () => {
const response = await certManagement.getEnrollmentId([student.authUser.username]);
expect(response.statusCode).toEqual(200);
enrollmentIdStudent = response.returnValue[0].enrollmentId;
expect(enrollmentIdStudent).not.toEqual("");
});
test("Create and send certificate signing request", async () => {
keypair = await createKeyPair();
const csr = await createCSR(keypair, enrollmentIdStudent);
const wrappingKeyObject = await deriveKeyFromPassword(encryptionPassword);
const encryptedPrivateKey = await wrapKey(keypair.privateKey, wrappingKeyObject.key, iv);
const base64EncryptedPrivateKey = arrayBufferToBase64(encryptedPrivateKey);
const base64iv = arrayBufferToBase64(iv);
const response = await certManagement.sendCertificateSigningRequest(student.authUser.username, csr, {
iv: base64iv,
key: base64EncryptedPrivateKey,
salt: wrappingKeyObject.salt,
});
expect(response.statusCode).toBe(201);
expect(response.returnValue.certificate).not.toBe(undefined);
expect(response.returnValue.certificate).not.toEqual("");
await new Promise((r) => setTimeout(r, 3000));
});
test("Update matriculation", async () => {
matriculationToApprove = [{ fieldOfStudy: EXAM_REG_1, semesters: ["SS2020"] }];
const result = await executeTransaction(
new GeneralMatriculationTransactionWrapper(student.authUser.username, matriculationToApprove),
protoURL
);
expect(result).toBe(true);
await new Promise((r) => setTimeout(r, 500));
});
test("Fetch self initiated operations", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(1);
const operation = response.returnValue[0];
expect(operation.state).toEqual(OperationStatus.PENDING);
expect(operation.reason).toEqual("");
expect(operation.transactionInfo.contractName).toEqual(UC4Identifier.CONTRACT_MATRICULATION);
expect(operation.transactionInfo.transactionName).toEqual(UC4Identifier.TRANSACTION_ADD_MATRICULATION);
expect(operation.transactionInfo.parameters).not.toEqual("");
const paramsArray: string[] = JSON.parse(operation.transactionInfo.parameters);
const proposalMatriculationData: MatriculationData = JSON.parse(paramsArray[0]);
expect(proposalMatriculationData.enrollmentId).toEqual(enrollmentIdStudent);
expect(isEqual(proposalMatriculationData.matriculationStatus, matriculationToApprove));
expect(operation.existingApprovals.users.length).toEqual(2);
expect(operation.existingApprovals.users[0]).toEqual("scala-admin-org1");
expect(operation.existingApprovals.users[1]).toEqual(enrollmentIdStudent);
expect(operation.existingApprovals.groups.length).toEqual(2);
expect(operation.existingApprovals.groups[0]).toEqual("System");
expect(operation.existingApprovals.groups[1]).toEqual("Student");
expect(operation.operationId).not.toEqual("");
operationIdToApprove = operation.operationId;
expect(operation.initiator).toEqual(enrollmentIdStudent);
expect(operation.initiatedTimestamp).not.toEqual("");
expect(operation.lastModifiedTimestamp).not.toEqual("");
});
test("Fetch selfActionRequired", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(undefined, true);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(0);
});
test("Fetch by states", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(undefined, undefined, [OperationStatus.PENDING]);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(1);
expect(response.returnValue[0].operationId).toEqual(operationIdToApprove);
const response2 = await operationManagement.getOperations(undefined, undefined, [OperationStatus.FINISHED]);
expect(response2.statusCode).toEqual(200);
expect(response2.returnValue.length).toEqual(0);
const response3 = await operationManagement.getOperations(undefined, undefined, [OperationStatus.REJECTED]);
expect(response3.statusCode).toEqual(200);
expect(response3.returnValue.length).toEqual(0);
const response4 = await operationManagement.getOperations(undefined, undefined, [
OperationStatus.PENDING,
OperationStatus.FINISHED,
]);
expect(response4.statusCode).toEqual(200);
expect(response4.returnValue.length).toEqual(1);
expect(response4.returnValue[0].operationId).toEqual(operationIdToApprove);
const response5 = await operationManagement.getOperations(undefined, undefined, [
OperationStatus.PENDING,
OperationStatus.FINISHED,
OperationStatus.REJECTED,
]);
expect(response5.statusCode).toEqual(200);
expect(response5.returnValue.length).toEqual(1);
expect(response5.returnValue[0].operationId).toEqual(operationIdToApprove);
const response6 = await operationManagement.getOperations(undefined, undefined, [
OperationStatus.FINISHED,
OperationStatus.REJECTED,
]);
expect(response6.statusCode).toEqual(200);
expect(response6.returnValue.length).toEqual(0);
});
test("Fetch with multiple parameters", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true, false, [OperationStatus.PENDING]);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(1);
expect(response.returnValue[0].operationId).toEqual(operationIdToApprove);
const response2 = await operationManagement.getOperations(false, false, [OperationStatus.PENDING]);
expect(response2.statusCode).toEqual(200);
expect(response2.returnValue.length).toEqual(1);
expect(response2.returnValue[0].operationId).toEqual(operationIdToApprove);
const response3 = await operationManagement.getOperations(true, false, [OperationStatus.FINISHED]);
expect(response3.statusCode).toEqual(200);
expect(response3.returnValue.length).toEqual(0);
});
test("Login as admin", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(admin.authUser);
expect(success.returnValue.login).not.toEqual("");
certManagement = new CertificateManagement();
enrollmentIdAdmin = (await certManagement.getEnrollmentId([admin.authUser.username])).returnValue[0].enrollmentId;
});
test("Create and send certificate signing request", async () => {
keypair = await createKeyPair();
const csr = await createCSR(keypair, enrollmentIdAdmin);
const wrappingKeyObject = await deriveKeyFromPassword(encryptionPassword);
const encryptedPrivateKey = await wrapKey(keypair.privateKey, wrappingKeyObject.key, iv);
const base64EncryptedPrivateKey = arrayBufferToBase64(encryptedPrivateKey);
const base64iv = arrayBufferToBase64(iv);
const response = await certManagement.sendCertificateSigningRequest(admin.authUser.username, csr, {
iv: base64iv,
key: base64EncryptedPrivateKey,
salt: wrappingKeyObject.salt,
});
expect(response.statusCode).toBe(201);
expect(response.returnValue.certificate).not.toBe(undefined);
expect(response.returnValue.certificate).not.toEqual("");
await new Promise((r) => setTimeout(r, 3000));
});
test("Fetch open operations as admin", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(false, true);
expect(response.returnValue.length).toBeGreaterThanOrEqual(1);
const operationToApprove = response.returnValue.find((e) => e.operationId == operationIdToApprove);
expect(operationToApprove !== undefined);
});
test("Approve operation as admin", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(false, true);
expect(response.returnValue.length).toBeGreaterThanOrEqual(1);
const operationToApprove = response.returnValue.find((e) => e.operationId == operationIdToApprove);
if (!operationToApprove) fail();
const success = await executeTransaction(new ApproveOperationTransaction(operationToApprove), protoURL);
expect(success).toBe(true);
});
test("Login as student", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(student.authUser);
expect(success.returnValue.login).not.toEqual("");
certManagement = new CertificateManagement();
});
test("Update matriculation for rejection", async () => {
matriculationToReject = [{ fieldOfStudy: EXAM_REG_1, semesters: ["SS2021"] }];
const result = await executeTransaction(
new GeneralMatriculationTransactionWrapper(student.authUser.username, matriculationToReject),
protoURL
);
expect(result).toBe(true);
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true, false, [OperationStatus.PENDING]);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(1);
expect(response.returnValue.filter((e) => e.operationId != operationIdToApprove).length).toEqual(1);
operationIdToReject = response.returnValue.filter((e) => e.operationId != operationIdToApprove)[0].operationId;
});
test("Update matriculation for approvalByDifferentStudent", async () => {
matriculationToApproveWithDifferentStudent = [{ fieldOfStudy: EXAM_REG_1, semesters: ["SS2019"] }];
const result = await executeTransaction(
new GeneralMatriculationTransactionWrapper(student.authUser.username, matriculationToApproveWithDifferentStudent),
protoURL
);
expect(result).toBe(true);
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true, false, [OperationStatus.PENDING]);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(2);
expect(
response.returnValue.filter((e) => e.operationId != operationIdToApprove && e.operationId != operationIdToReject).length
).toEqual(1);
operationIdToApproveWithDifferentStudent = response.returnValue.filter(
(e) => e.operationId != operationIdToApprove && e.operationId != operationIdToReject
)[0].operationId;
});
test("Login as admin", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(admin.authUser);
expect(success.returnValue.login).not.toEqual("");
certManagement = new CertificateManagement();
enrollmentIdAdmin = (await certManagement.getEnrollmentId([admin.authUser.username])).returnValue[0].enrollmentId;
});
test("Fetch empty watchlist", async () => {
const operationManagement = new OperationManagement();
const success = await operationManagement.getOperations(undefined, undefined, undefined, true);
expect(success.returnValue.length).toEqual(0);
});
test("Watch operation", async () => {
const operationManagement = new OperationManagement();
const success = await operationManagement.watchOperation(operationIdToReject);
expect(success.returnValue).toEqual(true);
});
test("Fetch watchlist", async () => {
const operationManagement = new OperationManagement();
const success = await operationManagement.getOperations(undefined, undefined, undefined, true);
expect(success.returnValue.length).toEqual(1);
expect(success.returnValue[0].operationId).toEqual(operationIdToReject);
});
test("Unwatch operation", async () => {
const operationManagement = new OperationManagement();
const success = await operationManagement.unwatchOperation(operationIdToReject);
expect(success.returnValue).toEqual(true);
});
test("Fetch empty watchlist", async () => {
const operationManagement = new OperationManagement();
const success = await operationManagement.getOperations(undefined, undefined, undefined, true);
expect(success.returnValue.length).toEqual(0);
});
test("Reject operation as admin", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(false, true);
expect(response.returnValue.length).toBeGreaterThanOrEqual(2);
const operationToReject = response.returnValue.find((e) => e.operationId == operationIdToReject);
if (!operationToReject) fail();
const success = await executeTransaction(new RejectOperationTransaction(operationToReject, rejectionReason), protoURL);
expect(success).toBe(true);
});
test("Login as student", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(student.authUser);
expect(success.returnValue.login).not.toEqual("");
});
test("Fetch operations", async () => {
const operationManagement = new OperationManagement();
const operations = await operationManagement.getOperations(true);
expect(operations.statusCode).toEqual(200);
expect(operations.returnValue.length).toEqual(3);
const approvedOperation = operations.returnValue.find((e) => e.state == OperationStatus.FINISHED);
expect(approvedOperation).not.toBe(undefined);
expect((await operationManagement.getOperations(true, undefined, [OperationStatus.FINISHED])).returnValue.length).toEqual(1);
const rejectedOperation = operations.returnValue.find((e) => e.state == OperationStatus.REJECTED);
expect(rejectedOperation).not.toBe(undefined);
expect((await operationManagement.getOperations(true, undefined, [OperationStatus.REJECTED])).returnValue.length).toEqual(1);
const pendingOperation = operations.returnValue.find((e) => e.state == OperationStatus.PENDING);
expect(pendingOperation).not.toBe(undefined);
expect((await operationManagement.getOperations(true, undefined, [OperationStatus.PENDING])).returnValue.length).toEqual(1);
});
test("See operation is watched", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true, false, undefined, true);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.find((e) => e.operationId == operationIdToApprove)).not.toBe(undefined);
});
test("Unwatch finished operation", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.unwatchOperation(operationIdToApprove);
expect(response.statusCode).toEqual(200);
expect(response.returnValue).toBe(true);
});
test("See operation is unwatched", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true, false, undefined, true);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.find((e) => e.operationId == operationIdToApprove)).toBe(undefined);
});
test("Fetch operation without watchlist again", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations(true, false, undefined, false);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).not.toEqual(0);
expect(response.returnValue.find((e) => e.operationId == operationIdToApprove)).not.toBe(undefined);
});
test("Fetch rejected operation", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperation(operationIdToReject);
expect(response.statusCode).toEqual(200);
const operation = response.returnValue;
expect(operation.operationId).toEqual(operationIdToReject);
expect(operation.reason).toEqual(rejectionReason);
expect(operation.state).toEqual(OperationStatus.REJECTED);
});
test("Login as other student", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(student2.authUser);
expect(success.returnValue.login).not.toEqual("");
certManagement = new CertificateManagement();
enrollmentIdStudent2 = (await certManagement.getEnrollmentId([student2.authUser.username])).returnValue[0].enrollmentId;
});
test("Create and send certificate signing request", async () => {
keypair = await createKeyPair();
const csr = await createCSR(keypair, enrollmentIdStudent2);
const wrappingKeyObject = await deriveKeyFromPassword(encryptionPassword);
const encryptedPrivateKey = await wrapKey(keypair.privateKey, wrappingKeyObject.key, iv);
const base64EncryptedPrivateKey = arrayBufferToBase64(encryptedPrivateKey);
const base64iv = arrayBufferToBase64(iv);
const response = await certManagement.sendCertificateSigningRequest(student2.authUser.username, csr, {
iv: base64iv,
key: base64EncryptedPrivateKey,
salt: wrappingKeyObject.salt,
});
expect(response.statusCode).toBe(201);
expect(response.returnValue.certificate).not.toBe(undefined);
expect(response.returnValue.certificate).not.toEqual("");
await new Promise((r) => setTimeout(r, 3000));
});
test("Fetch operations of other student", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperations();
expect(response.statusCode).toEqual(200);
expect(response.returnValue.length).toEqual(0);
});
test("Fetch operation of different student", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperation(operationIdToApproveWithDifferentStudent);
expect(response.statusCode).not.toEqual(200);
expect(response.statusCode).toEqual(403);
expect(response.returnValue.operationId).toBe(undefined);
});
test("Login as student", async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(student.authUser);
expect(success.returnValue.login).not.toEqual("");
});
test("Fetch pending operation", async () => {
const operationManagement = new OperationManagement();
const response = await operationManagement.getOperation(operationIdToApproveWithDifferentStudent);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.state).toEqual(OperationStatus.PENDING);
expect(response.returnValue.existingApprovals.users.length).toEqual(2); //3 if owner mismatch in 469 is resolved
expect(response.returnValue.reason).toEqual("");
});
test("Validate matriculation", async () => {
const matriculationManagement = new MatriculationManagement();
const response = await matriculationManagement.getMatriculationHistory(student.authUser.username);
expect(response.statusCode).toEqual(200);
expect(response.returnValue.matriculationStatus.length).toEqual(1);
expect(response.returnValue.matriculationStatus[0].fieldOfStudy).toEqual(matriculationToApprove[0].fieldOfStudy);
expect(response.returnValue.matriculationStatus[0].semesters.length).toEqual(1);
expect(response.returnValue.matriculationStatus[0].semesters[0]).toEqual(matriculationToApprove[0].semesters[0]);
});
test("Fetch certificate of enrollment", async () => {
const reportManagement = new ReportManagement();
const response = await reportManagement.getCertificateOfEnrollment(student.authUser.username, "SS2020");
expect(response.returnValue.size).toBeGreaterThan(0);
});
afterAll(async () => {
resetState(encryptionPassword);
const success = await MachineUserAuthenticationManagement._getRefreshToken(adminAuth);
expect(success).toEqual(true);
const userManagement = new UserManagement();
const response = await userManagement.forceDeleteUser(admin.authUser.username);
expect(response.statusCode).toEqual(200);
const response2 = await userManagement.forceDeleteUser(student.authUser.username);
expect(response2.statusCode).toEqual(200);
const response3 = await userManagement.forceDeleteUser(student2.authUser.username);
expect(response3.statusCode).toEqual(200);
});
});