Skip to content

Commit

Permalink
Adapt TestPolicyStateRecording
Browse files Browse the repository at this point in the history
Due to OID pre-allocation (8aa73f9)
there are now fewer audit records in some cases.

This fixes failing TestPolicyStateRecording on native repo.
  • Loading branch information
mederly committed Sep 6, 2023
1 parent ad77934 commit be7feba
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public void test220AliceAssign2a2b() throws Exception {
assertEquals("Wrong # of assignments", 2, alice.getAssignment().size());

displayDumpable("Audit", dummyAuditService);
dummyAuditService.assertExecutionRecords(2); // rules without IDs, with IDs ?
dummyAuditService.assertExecutionRecords(1 + accessesMetadataAuditOverhead(1));

for (AssignmentType assignment : alice.getAssignment()) {
assertExclusionViolationState(assignment, 1);
Expand Down Expand Up @@ -428,7 +428,7 @@ public void test310CreateWrongRole() throws Exception {
assertEquals("Wrong policy situations for role", Collections.singletonList(WRONG_URI), wrong2.getPolicySituation());

displayDumpable("Audit", dummyAuditService);
dummyAuditService.assertExecutionRecords(2); // extra policy state update because of OID
dummyAuditService.assertExecutionRecords(1 + accessesMetadataAuditOverhead(1));
}

@Test
Expand Down

0 comments on commit be7feba

Please sign in to comment.