Add RBAC test for force-deleting a backup
This patch adds a new test for force-deleting a backup in
test_volumes_backup_rbac, which tests the cinder policy action:
"volume_extension:backup_admin_actions:force_delete".
This patch also corrects the currently wrong policy action for
the test test_snapshot_force_delete from
"volume_extension:volume_admin_actions:force_delete" to
"volume_extension:snapshot_admin_actions:force_delete". (The
``_force_delete`` function in the cinder admin actions API enforces
the policy action corresponding to the resource name [0][1]).
[0] https://github.com/openstack/cinder/blob/master/cinder/api/contrib/admin_actions.py#L133
[1] https://github.com/openstack/cinder/blob/master/cinder/api/contrib/admin_actions.py#L82
Change-Id: Icecf2152fe84da2847ae677a74a4d183eb4cd88b
diff --git a/releasenotes/notes/add-force-delete-backup-test-7e896affd1471328.yaml b/releasenotes/notes/add-force-delete-backup-test-7e896affd1471328.yaml
new file mode 100644
index 0000000..3d81baa
--- /dev/null
+++ b/releasenotes/notes/add-force-delete-backup-test-7e896affd1471328.yaml
@@ -0,0 +1,11 @@
+---
+features:
+ - |
+ Added an RBAC test for force-deleting a backup which enforces the cinder
+ policy action: "volume_extension:backup_admin_actions:force_delete".
+fixes:
+ - |
+ Corrected the policy action in the ``rbac_rule_validation`` decorator
+ for the test ``test_snapshot_force_delete`` from
+ "volume_extension:volume_admin_actions:force_delete" to
+ "volume_extension:snapshot_admin_actions:force_delete".