How to use _test_cold_migrate_server method in tempest

Best Python code snippet using tempest_python

test_migrations.py

Source:test_migrations.py Github

copy

Full Screen

...77 waiters.wait_for_server_status(self.servers_client, server['id'],78 'ACTIVE')79 server = self.servers_client.show_server(server['id'])['server']80 self.assertEqual(flavor['id'], server['flavor']['id'])81 def _test_cold_migrate_server(self, revert=False):82 if CONF.compute.min_compute_nodes < 2:83 msg = "Less than 2 compute nodes, skipping multinode tests."84 raise self.skipException(msg)85 server = self.create_test_server(wait_until="ACTIVE")86 src_host = self.admin_servers_client.show_server(87 server['id'])['server']['OS-EXT-SRV-ATTR:host']88 self.admin_servers_client.migrate_server(server['id'])89 waiters.wait_for_server_status(self.servers_client,90 server['id'], 'VERIFY_RESIZE')91 if revert:92 self.servers_client.revert_resize_server(server['id'])93 assert_func = self.assertEqual94 else:95 self.servers_client.confirm_resize_server(server['id'])96 assert_func = self.assertNotEqual97 waiters.wait_for_server_status(self.servers_client,98 server['id'], 'ACTIVE')99 dst_host = self.admin_servers_client.show_server(100 server['id'])['server']['OS-EXT-SRV-ATTR:host']101 assert_func(src_host, dst_host)102 @decorators.idempotent_id('4bf0be52-3b6f-4746-9a27-3143636fe30d')103 @testtools.skipUnless(CONF.compute_feature_enabled.cold_migration,104 'Cold migration not available.')105 def test_cold_migration(self):106 self._test_cold_migrate_server(revert=False)107 @decorators.idempotent_id('caa1aa8b-f4ef-4374-be0d-95f001c2ac2d')108 @testtools.skipUnless(CONF.compute_feature_enabled.cold_migration,109 'Cold migration not available.')110 def test_revert_cold_migration(self):...

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