From a179bd08a01e71811fb67dc1893c6e6281381972 Mon Sep 17 00:00:00 2001 From: Deepthi Kandavara Jayarama Date: Fri, 23 Feb 2018 18:40:43 +0000 Subject: [PATCH] [Client-cert] NSX manager api response has changed in equinox Code change to match the new response and backward compatible with earlier releases Change-Id: Ic7a3587a12260cb0da4a2ba351193606c5702362 --- .../nsxv3/scenario/test_client_cert_mgmt_ops.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vmware_nsx_tempest/tests/nsxv3/scenario/test_client_cert_mgmt_ops.py b/vmware_nsx_tempest/tests/nsxv3/scenario/test_client_cert_mgmt_ops.py index fb78787..4c50260 100644 --- a/vmware_nsx_tempest/tests/nsxv3/scenario/test_client_cert_mgmt_ops.py +++ b/vmware_nsx_tempest/tests/nsxv3/scenario/test_client_cert_mgmt_ops.py @@ -35,8 +35,8 @@ LOG = logging.getLogger(__name__) class TestCertificateMgmt(manager.NetworkScenarioTest): - error_message = ("Principal 'admin' from group 'superusers' attempts\ - to delete or modify an object it doesn't own") + error_msg = ["Principal \'admin\'", + "attempts to delete or modify an object it doesn't own"] @classmethod def skip_checks(cls): @@ -119,9 +119,11 @@ class TestCertificateMgmt(manager.NetworkScenarioTest): is unable to delete or modify openstack entities """ msg = 'Error: NSX admin is able to modify/delete' - self.assertIn(self.error_message, - response.json()['error_message'], msg) - LOG.info('NSX admin is unable to modify/delete the openstack object') + if all(x in response.json()['error_message'] for x in self.error_msg): + LOG.info('NSX admin is unable to modify/delete ' + 'the openstack object') + else: + raise Exception(msg) def ca_topo(self): """