How to use _create_delete_server_group method in tempest

Best Python code snippet using tempest_python

test_server_group.py

Source:test_server_group.py Github

copy

Full Screen

...52 self.client.delete_server_group(server_group['id'])53 # validation of server-group deletion54 server_group_list = self.client.list_server_groups()['server_groups']55 self.assertNotIn(server_group, server_group_list)56 def _create_delete_server_group(self, policy):57 # Create and Delete the server-group with given policy58 name = data_utils.rand_name('server-group')59 server_group = self._create_server_group(name, policy)60 self._delete_server_group(server_group)61 @test.idempotent_id('5dc57eda-35b7-4af7-9e5f-3c2be3d2d68b')62 def test_create_delete_server_group_with_affinity_policy(self):63 # Create and Delete the server-group with affinity policy64 self._create_delete_server_group(self.policy)65 @test.idempotent_id('3645a102-372f-4140-afad-13698d850d23')66 def test_create_delete_server_group_with_anti_affinity_policy(self):67 # Create and Delete the server-group with anti-affinity policy68 policy = ['anti-affinity']69 self._create_delete_server_group(policy)70 @decorators.skip_because(bug="1324348")71 @test.idempotent_id('6d9bae05-eb32-425d-a673-e14e1b1c6306')72 def test_create_delete_server_group_with_multiple_policies(self):73 # Create and Delete the server-group with multiple policies74 policies = ['affinity', 'affinity']75 self._create_delete_server_group(policies)76 @test.idempotent_id('154dc5a4-a2fe-44b5-b99e-f15806a4a113')77 def test_create_delete_multiple_server_groups_with_same_name_policy(self):78 # Create and Delete the server-groups with same name and same policy79 server_groups = []80 server_group_name = data_utils.rand_name('server-group')81 for i in range(0, 2):82 server_groups.append(self._create_server_group(server_group_name,83 self.policy))84 for key in ['name', 'policies']:85 self.assertEqual(server_groups[0][key], server_groups[1][key])86 self.assertNotEqual(server_groups[0]['id'], server_groups[1]['id'])87 for i in range(0, 2):88 self._delete_server_group(server_groups[i])89 @test.idempotent_id('b3545034-dd78-48f0-bdc2-a4adfa6d0ead')...

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