How to use _verify_volume_clone method in tempest

Best Python code snippet using tempest_python

test_volumes_clone.py

Source:test_volumes_clone.py Github

copy

Full Screen

...22 def skip_checks(cls):23 super(VolumesCloneTest, cls).skip_checks()24 if not CONF.volume_feature_enabled.clone:25 raise cls.skipException("Cinder volume clones are disabled")26 def _verify_volume_clone(self, source_volume, cloned_volume,27 bootable='false', extra_size=0):28 cloned_vol_details = self.volumes_client.show_volume(29 cloned_volume['id'])['volume']30 self.assertEqual(source_volume['id'],31 cloned_vol_details['source_volid'])32 self.assertEqual(source_volume['size'] + extra_size,33 cloned_vol_details['size'])34 self.assertEqual(bootable, cloned_vol_details['bootable'])35 @decorators.idempotent_id('9adae371-a257-43a5-9555-dc7c88e66e0e')36 def test_create_from_volume(self):37 # Creates a volume from another volume passing a size different from38 # the source volume.39 src_size = CONF.volume.volume_size40 src_vol = self.create_volume(size=src_size)41 # Destination volume bigger than source42 dst_vol = self.create_volume(source_volid=src_vol['id'],43 size=src_size + 1)44 self._verify_volume_clone(src_vol, dst_vol, extra_size=1)45 @decorators.idempotent_id('cbbcd7c6-5a6c-481a-97ac-ca55ab715d16')46 @utils.services('image')47 def test_create_from_bootable_volume(self):48 # Create volume from image49 img_uuid = CONF.compute.image_ref50 src_vol = self.create_volume(imageRef=img_uuid)51 # Create a volume from the bootable volume52 cloned_vol = self.create_volume(source_volid=src_vol['id'])...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful