Codebase list cinder-tempest-plugin / 68347e7
Conditionallly skip manage snapshot tests The cinder manage snapshots commands are not supported by all drivers, so the RBAC tests should be conditional to the driver supporting it. The unmanage snapshot RBAC tests can still be run, because the failure should happen at the API level, so it doesn't matter if the driver supports it or not. Change-Id: I2a65f8655a7418a9099e8d7593bd7d7009f22d9d Gorka Eguileor authored 1 year, 10 months ago Brian Rosmaita committed 1 year, 10 months ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1616 from tempest.lib import decorators
1717 from tempest.lib import exceptions
1818
19 import testtools
20
1921 from cinder_tempest_plugin.rbac.v3 import base as rbac_base
2022
2123 CONF = config.CONF
308310 def test_force_delete_snapshot(self):
309311 self._force_delete_snapshot(expected_status=exceptions.Forbidden)
310312
313 # We don't need to skip the unmanage because the failure should happen at
314 # the API level, so it should fail regardless of the driver support for
315 # unmanaging snapshots.
311316 @decorators.idempotent_id('35495666-b663-4c68-ba44-0695e30a6838')
312317 def test_unmanage_snapshot(self):
313318 self._unmanage_snapshot(expected_status=exceptions.Forbidden)
314319
320 @testtools.skipUnless(CONF.volume_feature_enabled.manage_snapshot,
321 'manage snapshots are disabled')
315322 @decorators.idempotent_id('d2d1326d-fb47-4448-a1e1-2d1219d30fd5')
316323 def test_manage_snapshot(self):
317324 self._manage_snapshot(
361368 def test_force_delete_snapshot(self):
362369 self._force_delete_snapshot(expected_status=exceptions.Forbidden)
363370
371 # We don't need to skip the unmanage because the failure should happen at
372 # the API level, so it should fail regardless of the driver support for
373 # unmanaging snapshots.
364374 @decorators.idempotent_id('dd7da3da-68ef-42f5-af1d-29803a4a04fd')
365375 def test_unmanage_snapshot(self):
366376 self._unmanage_snapshot(expected_status=exceptions.Forbidden)
367377
378 @testtools.skipUnless(CONF.volume_feature_enabled.manage_snapshot,
379 'manage snapshots are disabled')
368380 @decorators.idempotent_id('c2501d05-9bca-42d7-9ab5-c0d9133e762f')
369381 def test_manage_snapshot(self):
370382 self._manage_snapshot(