This is an automated email from the ASF dual-hosted git repository.
weizhou pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new 0597def630e test: fix component tests test_acl_isolatednetwork and
test_acl_isolatednetwork_delete (#9571)
0597def630e is described below
commit 0597def630eb6cfaeaf2b2b0ac00a49036bab10e
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Aug 23 19:27:11 2024 +0200
test: fix component tests test_acl_isolatednetwork and
test_acl_isolatednetwork_delete (#9571)
* test: fix component tests test_acl_isolatednetwork and
test_acl_isolatednetwork_delete
* Update test/integration/component/test_acl_isolatednetwork.py
---
test/integration/component/test_acl_isolatednetwork.py | 12 ++++++------
.../integration/component/test_acl_isolatednetwork_delete.py | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/test/integration/component/test_acl_isolatednetwork.py
b/test/integration/component/test_acl_isolatednetwork.py
index 038fd358972..8397171bcc6 100644
--- a/test/integration/component/test_acl_isolatednetwork.py
+++ b/test/integration/component/test_acl_isolatednetwork.py
@@ -799,7 +799,7 @@ class TestIsolatedNetwork(cloudstackTestCase):
self.fail("Domain admin is allowed to deploy vm for users not in
hos domain ")
except Exception as e:
self.debug("When Domain admin tries to deploy vm for users in
their sub domain %s" % e)
- if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_DOMAIN):
+ if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Domain admin
tries to deploy vm for users not in hos domain ")
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -876,7 +876,7 @@ class TestIsolatedNetwork(cloudstackTestCase):
self.fail("Regular user is allowed to deploy vm for other users in
their domain ")
except Exception as e:
self.debug("When user tries to deploy vm for users in their domain
%s" % e)
- if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
+ if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Regular user
tries to deploy vm for other users in their domain ")
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -903,7 +903,7 @@ class TestIsolatedNetwork(cloudstackTestCase):
self.fail("Regular user is allowed to deploy vm for users not in
their domain ")
except Exception as e:
self.debug("When user tries to deploy vm for users n different
domain %s" % e)
- if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
+ if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Regular user
tries to deploy vm for users not in their domain ")
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -1030,7 +1030,7 @@ class TestIsolatedNetwork(cloudstackTestCase):
self.fail("Domain admin is allowed to restart network for users
not in their domain ")
except Exception as e:
self.debug("When Domain admin tries to restart network for users
in their sub domain %s" % e)
- if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_DOMAIN):
+ if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Domain admin
tries to restart network for users not in their domain ")
## Test cases relating restart network as regular user
@@ -1061,7 +1061,7 @@ class TestIsolatedNetwork(cloudstackTestCase):
self.fail("Regular user is allowed to restart network for users in
their domain ")
except Exception as e:
self.debug("When user tries to restart network for users in their
domain %s" % e)
- if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
+ if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Regular user
tries to restart network for users in their domain ")
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -1077,7 +1077,7 @@ class TestIsolatedNetwork(cloudstackTestCase):
self.fail("Regular user is allowed to restart network for users
not in their domain ")
except Exception as e:
self.debug("When user tries to restart network for users in other
domain %s" % e)
- if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
+ if not CloudstackAclException.verifyMsginException(e,
CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Regular user
is allowed to restart network for users not in their domain ")
@staticmethod
diff --git a/test/integration/component/test_acl_isolatednetwork_delete.py
b/test/integration/component/test_acl_isolatednetwork_delete.py
index a8c4b67557e..6781dccad66 100644
--- a/test/integration/component/test_acl_isolatednetwork_delete.py
+++ b/test/integration/component/test_acl_isolatednetwork_delete.py
@@ -455,7 +455,7 @@ class TestIsolatedNetworkDelete(cloudstackTestCase):
self.fail("Domain admin is allowed to delete network for users not
in their domain ")
except Exception as e:
self.debug ("When Domain admin tries to delete network for user in
a different domain %s" %e)
- if not
CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_DOMAIN):
+ if not
CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Domain admin
tries to delete network for users not in their domain ")
## Test cases relating deleting network as regular user
@@ -490,7 +490,7 @@ class TestIsolatedNetworkDelete(cloudstackTestCase):
self.fail("Regular user is allowed to delete network for users in
their domain ")
except Exception as e:
self.debug ("When user tries to delete network for users in
their domain %s" %e)
- if not
CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
+ if not
CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Regular user is allowed to delete network for
users in their domain ")
@attr("simulator_only",tags=["advanced"],required_hardware="false")
@@ -508,7 +508,7 @@ class TestIsolatedNetworkDelete(cloudstackTestCase):
self.fail("Regular user is allowed to delete network for users not
in their domain ")
except Exception as e:
self.debug ("When user tries to delete network for users in other
domain %s" %e)
- if not
CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
+ if not
CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
self.fail("Error message validation failed when Regular user
tries to delete network for users not in their domain ")
@staticmethod