How to use test_stop_start_server method in tempest

Best Python code snippet using tempest_python

test_server_actions.py

Source:test_server_actions.py Github

copy

Full Screen

...205 resp, server = self.client.resume_server(self.server_id)206 self.assertEqual(202, resp.status)207 self.client.wait_for_server_status(self.server_id, 'ACTIVE')208 @attr(type='gate')209 def test_stop_start_server(self):210 resp, server = self.servers_client.stop(self.server_id)211 self.assertEqual(202, resp.status)212 self.servers_client.wait_for_server_status(self.server_id, 'SHUTOFF')213 resp, server = self.servers_client.start(self.server_id)214 self.assertEqual(202, resp.status)215 self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')216 @skip_because(bug="1233026")217 @attr(type='gate')218 def test_lock_unlock_server(self):219 # Lock the server,try server stop(exceptions throw),unlock it and retry220 resp, server = self.servers_client.lock_server(self.server_id)221 self.assertEqual(202, resp.status)222 resp, server = self.servers_client.get_server(self.server_id)223 self.assertEqual(200, resp.status)...

Full Screen

Full Screen

test_stop_server.py

Source:test_stop_server.py Github

copy

Full Screen

...24 cls.ping_ip = cls.server.addresses.get_by_name(25 cls.servers_config.network_for_ssh).ipv426 cls.verify_server_reachable(cls.ping_ip)27 @tags(type='smoke', net='no')28 def test_stop_start_server(self):29 """Verify that a server can be stopped and then started"""30 response = self.admin_servers_client.stop_server(self.server.id)31 self.assertEqual(response.status_code, 202)32 self.admin_server_behaviors.wait_for_server_status(33 self.server.id, ServerStates.SHUTOFF)34 PingClient.ping_until_unreachable(35 self.ping_ip, timeout=60, interval_time=5)36 response = self.admin_servers_client.start_server(self.server.id)37 self.assertEqual(response.status_code, 202)38 self.admin_server_behaviors.wait_for_server_status(39 self.server.id, ServerStates.ACTIVE)40 PingClient.ping_until_reachable(41 self.ping_ip, timeout=60, interval_time=5)42 self.assertTrue(self.server_behaviors.get_remote_instance_client(...

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