Best Python code snippet using tempest_python
test_server_actions.py
Source:test_server_actions.py
...346 @decorators.related_bug('1737599')347 @testtools.skipUnless(CONF.compute_feature_enabled.resize,348 'Resize not available.')349 @utils.services('volume')350 def test_resize_server_revert_with_volume_attached(self):351 # Tests attaching a volume to a server instance and then resizing352 # the instance. Once the instance is resized, revert the resize which353 # should move the instance and volume attachment back to the original354 # compute host.355 # Create a blank volume and attach it to the server created in setUp.356 volume = self.create_volume()357 server = self.client.show_server(self.server_id)['server']358 self.attach_volume(server, volume)359 # Now resize the server with the blank volume attached.360 self.client.resize_server(self.server_id, self.flavor_ref_alt)361 # Explicitly delete the server to get a new one for later362 # tests. Avoids resize down race issues.363 self.addCleanup(self.delete_server, self.server_id)364 waiters.wait_for_server_status(...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!