tests to cover the ACs for APPS-424

This commit is contained in:
rodicasutu
2020-09-10 10:37:02 +03:00
parent 382e9e7474
commit c3f771125c
2 changed files with 16 additions and 1 deletions

View File

@@ -264,5 +264,5 @@ public class RecordProperties extends TestModel
private String store;
@JsonProperty(PROPERTIES_WORM_UNLOCK_DATE)
private String wormUnlockDate;
private Date wormUnlockDate;
}

View File

@@ -116,4 +116,19 @@ public class ActionsExecutionAPI extends RMModelRequest
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.WORM_LOCK.getActionValue(), targetNode);
}
/**
* WORM lock a node for a period of days
* *
* @param targetNode the node on which the action is executed
* @param retentionPeriod the retention period in days for the WORM lock
* @throws Exception
*/
@SneakyThrows
public JSONObject addWORMLock(RepoTestModel targetNode, int retentionPeriod)
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.WORM_LOCK.getActionValue(), targetNode,
ImmutableMap.of("retentionPeriod",String.valueOf(retentionPeriod)));
}
}