How to use test_rebuild_server_in_stop_state method in tempest

Best Python code snippet using tempest_python

test_server_actions.py

Source:test_server_actions.py Github

copy

Full Screen

...122 # Verify that the user can authenticate with the provided password123 linux_client = RemoteClient(server, self.ssh_user, password)124 self.assertTrue(linux_client.can_authenticate())125 @attr(type='gate')126 def test_rebuild_server_in_stop_state(self):127 # The server in stop state should be rebuilt using the provided128 # image and remain in SHUTOFF state129 resp, server = self.client.get_server(self.server_id)130 old_image = server['image']['id']131 new_image = self.image_ref_alt \132 if old_image == self.image_ref else self.image_ref133 resp, server = self.client.stop(self.server_id)134 self.assertEqual(202, resp.status)135 self.client.wait_for_server_status(self.server_id, 'SHUTOFF')136 self.addCleanup(self.client.start, self.server_id)137 resp, rebuilt_server = self.client.rebuild(self.server_id, new_image)138 self.addCleanup(self.client.wait_for_server_status, self.server_id,139 'SHUTOFF')140 self.addCleanup(self.client.rebuild, self.server_id, old_image)...

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