Remove unused func _detach
Func _detach is not used in test_volumes_snapshots, so this is to remove it. Besides, func cleanup_snapshot should be placed before testcases. Change-Id: I961a3400a3777c6032815e2ee9c68f0cd76a43c2
This commit is contained in:
parent
268cd656bc
commit
95a50e9814
@ -34,11 +34,11 @@ class VolumesV2SnapshotTestJSON(base.BaseVolumeTest):
|
||||
cls.name_field = cls.special_fields['name_field']
|
||||
cls.descrip_field = cls.special_fields['descrip_field']
|
||||
|
||||
def _detach(self, volume_id):
|
||||
"""Detach volume."""
|
||||
self.volumes_client.detach_volume(volume_id)
|
||||
waiters.wait_for_volume_status(self.volumes_client,
|
||||
volume_id, 'available')
|
||||
def cleanup_snapshot(self, snapshot):
|
||||
# Delete the snapshot
|
||||
self.snapshots_client.delete_snapshot(snapshot['id'])
|
||||
self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
|
||||
self.snapshots.remove(snapshot)
|
||||
|
||||
@test.idempotent_id('b467b54c-07a4-446d-a1cf-651dedcc3ff1')
|
||||
@test.services('compute')
|
||||
@ -121,12 +121,6 @@ class VolumesV2SnapshotTestJSON(base.BaseVolumeTest):
|
||||
self.assertEqual(volume['snapshot_id'], src_snap['id'])
|
||||
self.assertEqual(int(volume['size']), src_size + 1)
|
||||
|
||||
def cleanup_snapshot(self, snapshot):
|
||||
# Delete the snapshot
|
||||
self.snapshots_client.delete_snapshot(snapshot['id'])
|
||||
self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
|
||||
self.snapshots.remove(snapshot)
|
||||
|
||||
|
||||
class VolumesV1SnapshotTestJSON(VolumesV2SnapshotTestJSON):
|
||||
_api_version = 1
|
||||
|
Loading…
Reference in New Issue
Block a user