-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…803) * feat: Update `retention_policies` and `retention_policy_assignments`
- Loading branch information
1 parent
526aa30
commit 8b72f7e
Showing
6 changed files
with
96 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from test.integration_new import util | ||
from test.integration_new import CLIENT | ||
|
||
|
||
def test_create_metedata_template_with_fields(): | ||
policy_name = 'Test Retention Policy ' + util.random_name() | ||
disposition_action = 'permanently_delete' | ||
retention_length = '1' | ||
retention_type = 'modifiable' | ||
policy_description = 'Test Retention Policy' | ||
|
||
retention_policy = CLIENT.create_retention_policy( | ||
policy_name=policy_name, | ||
disposition_action=disposition_action, | ||
retention_length=retention_length, | ||
retention_type=retention_type, | ||
description=policy_description | ||
) | ||
|
||
try: | ||
assert retention_policy.policy_name == policy_name | ||
assert retention_policy.disposition_action == disposition_action | ||
assert retention_policy.retention_length == retention_length | ||
assert retention_policy.retention_type == retention_type | ||
assert retention_policy.description == policy_description | ||
|
||
new_policy_name = 'Test Retention Policy ' + util.random_name() | ||
new_policy_description = 'Test Retention Policy Updated' | ||
retention_policy.update_info(data={ | ||
'policy_name': new_policy_name, | ||
'description': new_policy_description | ||
}) | ||
|
||
retention_policy = CLIENT.retention_policy(retention_id=retention_policy.object_id).get() | ||
assert retention_policy.policy_name == new_policy_name | ||
assert retention_policy.description == new_policy_description | ||
finally: | ||
retention_policy.update_info(data={ | ||
'status': 'retired' | ||
}) |
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