How to use test_update_server_metadata method in tempest

Best Python code snippet using tempest_python

test_server_metadata.py

Source:test_server_metadata.py Github

copy

Full Screen

...49 resp_metadata = (self.client.list_server_metadata(self.server_id)50 ['metadata'])51 self.assertEqual(resp_metadata, req_metadata)52 @test.idempotent_id('344d981e-0c33-4997-8a5d-6c1d803e4134')53 def test_update_server_metadata(self):54 # The server's metadata values should be updated to the55 # provided values56 meta = {'key1': 'alt1', 'key3': 'value3'}57 self.client.update_server_metadata(self.server_id, meta)58 # Verify the values have been updated to the proper values59 resp_metadata = (self.client.list_server_metadata(self.server_id)60 ['metadata'])61 expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}62 self.assertEqual(expected, resp_metadata)63 @test.idempotent_id('0f58d402-e34a-481d-8af8-b392b17426d9')64 def test_update_metadata_empty_body(self):65 # The original metadata should not be lost if empty metadata body is66 # passed67 meta = {}...

Full Screen

Full Screen

test_server_metadata_rbac.py

Source:test_server_metadata_rbac.py Github

copy

Full Screen

...46 @decorators.idempotent_id('1060bac4-fe16-4a77-be64-d8e482a06eab')47 @rbac_rule_validation.action(48 service="nova",49 rules=["os_compute_api:server-metadata:create"])50 def test_update_server_metadata(self):51 with self.override_role():52 self.servers_client.update_server_metadata(self.server['id'], {})53 @decorators.idempotent_id('93dd8323-d3fa-48d1-8bd6-91c1b62fc341')54 @rbac_rule_validation.action(55 service="nova",56 rules=["os_compute_api:server-metadata:show"])57 def test_show_server_metadata_item(self):58 with self.override_role():59 self.servers_client.show_server_metadata_item(60 self.server['id'], 'default_key')61 @decorators.idempotent_id('79511293-4bd7-447d-ba7e-634d0f4da70c')62 @rbac_rule_validation.action(63 service="nova",64 rules=["os_compute_api:server-metadata:update"])...

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