How to use test_rebuild_server_in_error_state method in tempest

Best Python code snippet using tempest_python

test_servers.py

Source:test_servers.py Github

copy

Full Screen

...93 'read_req', 'write_req', 'cpu', 'memory']94 for key in basic_attrs:95 self.assertIn(key, str(diagnostic.keys()))96 @attr(type='gate')97 def test_rebuild_server_in_error_state(self):98 # The server in error state should be rebuilt using the provided99 # image and changed to ACTIVE state100 # resetting vm state require admin priviledge101 resp, server = self.client.reset_state(self.s1_id, state='error')102 self.assertEqual(202, resp.status)103 resp, rebuilt_server = self.non_admin_client.rebuild(104 self.s1_id, self.image_ref_alt)105 self.addCleanup(self.non_admin_client.wait_for_server_status,106 self.s1_id, 'ACTIVE')107 self.addCleanup(self.non_admin_client.rebuild, self.s1_id,108 self.image_ref)109 # Verify the properties in the initial response are correct110 self.assertEqual(self.s1_id, rebuilt_server['id'])111 rebuilt_image_id = rebuilt_server['image']['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