Skip to content

Commit

Permalink
Adapt TestResourceInMaintenance
Browse files Browse the repository at this point in the history
This commit fixes that failing test by adapting it to the fact that
we no longer attempt to delete accounts in the PROPOSED state.
  • Loading branch information
mederly committed Nov 13, 2023
1 parent 1595f11 commit 460661f
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -598,33 +598,28 @@ public void test090CreateAndDeleteAccountWithRole() throws Exception {

then("unassign");
result3.computeStatus();
TestUtil.assertInProgress("resource in the maintenance pending delta", result3);
// Before 4.9, the result was "in progress" here.
// But since the proposed accounts are no longer attempted to be deleted, it is "success",
// because the operation was not even attempted.
TestUtil.assertSuccess(result3);

assertModelShadowNoFetch(newShadowOid)
.display("Shadow after delete")
.assertKind(ShadowKindType.ACCOUNT)
.assertNotDead()
.assertDead()
.assertIsNotExists()
.assertNoLegacyConsistency()
.attributes()
.assertHasPrimaryIdentifier()
.end()
.pendingOperations()
.assertOperations(2) // 1x create + 1x delete
.deleteOperation()
.assertExecutionStatus(PendingOperationExecutionStatusType.EXECUTING)
.assertResultStatus(OperationResultStatusType.IN_PROGRESS)
.assertAttemptNumber(1)
.delta()
.display()
.assertDelete()
.end()
.end();
.assertOperations(1); // completed (not applicable) "add" operation

when("maintenance off");

turnMaintenanceModeOff(result);

// Apply pending create + delete delta:
// Just repeat the recomputation (nothing should happen)
OperationResult result4 = createOperationResult();
modelService.recompute(UserType.class, USER2_OID, executeOptions().reconcile(), task, result4);

Expand Down

0 comments on commit 460661f

Please sign in to comment.