Add RBAC tests for extend volume policy actions

Bug #1700839 reported by Felipe Monteiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Patrole
Invalid
Wishlist
Unassigned

Bug Description

Add RBAC tests for the follow test cases:

    @decorators.idempotent_id('9a36df71-a257-43a5-9555-dc7c88e66e0e')
    def test_volume_extend(self):
        # Extend Volume Test.
        volume = self.create_volume()
        extend_size = volume['size'] + 1
        self.volumes_client.extend_volume(volume['id'],
                                          new_size=extend_size)
        waiters.wait_for_volume_resource_status(self.volumes_client,
                                                volume['id'], 'available')
        volume = self.volumes_client.show_volume(volume['id'])['volume']
        self.assertEqual(volume['size'], extend_size)

    @decorators.idempotent_id('86be1cba-2640-11e5-9c82-635fb964c912')
    @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,
                          "Cinder volume snapshots are disabled")
    @decorators.skip_because(bug='1687044')
    def test_volume_extend_when_volume_has_snapshot(self):
        volume = self.create_volume()
        self.create_snapshot(volume['id'])

        extend_size = volume['size'] + 1
        self.volumes_client.extend_volume(volume['id'], new_size=extend_size)

        waiters.wait_for_volume_resource_status(self.volumes_client,
                                                volume['id'], 'available')
        resized_volume = self.volumes_client.show_volume(
            volume['id'])['volume']
        self.assertEqual(extend_size, resized_volume['size'])

This should provide coverage for "volume:extend" and "volume_extension:extended_snapshot_attributes" (of course, this requires proper verification and testing).

Revision history for this message
Felipe Monteiro (fm577c) wrote :

Actually, these tests already exist.

Changed in patrole:
importance: Undecided → Wishlist
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.