How to use test_pause_unpause_server method in tempest

Best Python code snippet using tempest_python

test_server_actions.py

Source:test_server_actions.py Github

copy

Full Screen

...189 self.assertIsNotNone(output)190 lines = len(output.split('\n'))191 self.assertEqual(lines, 10)192 @attr(type='gate')193 def test_pause_unpause_server(self):194 resp, server = self.client.pause_server(self.server_id)195 self.assertEqual(202, resp.status)196 self.client.wait_for_server_status(self.server_id, 'PAUSED')197 resp, server = self.client.unpause_server(self.server_id)198 self.assertEqual(202, resp.status)199 self.client.wait_for_server_status(self.server_id, 'ACTIVE')200 @attr(type='gate')201 def test_suspend_resume_server(self):202 resp, server = self.client.suspend_server(self.server_id)203 self.assertEqual(202, resp.status)204 self.client.wait_for_server_status(self.server_id, 'SUSPENDED')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')...

Full Screen

Full Screen

test_pause_server.py

Source:test_pause_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_pause_unpause_server(self):29 """Verify that a server can be paused and then unpaused successfully"""30 response = self.admin_servers_client.pause_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.PAUSED)34 PingClient.ping_until_unreachable(35 self.ping_ip, timeout=60, interval_time=5)36 response = self.admin_servers_client.unpause_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