Skip to content

Commit 0597def

Browse files
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
1 parent 1a403f1 commit 0597def

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/integration/component/test_acl_isolatednetwork.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ def test_17_deployvm_domaindmin_forcrossdomainuser(self):
799799
self.fail("Domain admin is allowed to deploy vm for users not in hos domain ")
800800
except Exception as e:
801801
self.debug("When Domain admin tries to deploy vm for users in their sub domain %s" % e)
802-
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_DOMAIN):
802+
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
803803
self.fail("Error message validation failed when Domain admin tries to deploy vm for users not in hos domain ")
804804

805805
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -876,7 +876,7 @@ def test_19_deployvm_user_foruserinsamedomain(self):
876876
self.fail("Regular user is allowed to deploy vm for other users in their domain ")
877877
except Exception as e:
878878
self.debug("When user tries to deploy vm for users in their domain %s" % e)
879-
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
879+
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
880880
self.fail("Error message validation failed when Regular user tries to deploy vm for other users in their domain ")
881881

882882
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -903,7 +903,7 @@ def test_20_deployvm_user_foruserincrossdomain(self):
903903
self.fail("Regular user is allowed to deploy vm for users not in their domain ")
904904
except Exception as e:
905905
self.debug("When user tries to deploy vm for users n different domain %s" % e)
906-
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
906+
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
907907
self.fail("Error message validation failed when Regular user tries to deploy vm for users not in their domain ")
908908

909909
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -1030,7 +1030,7 @@ def test_27_restartNetwork_domaindmin_forcrossdomainuser(self):
10301030
self.fail("Domain admin is allowed to restart network for users not in their domain ")
10311031
except Exception as e:
10321032
self.debug("When Domain admin tries to restart network for users in their sub domain %s" % e)
1033-
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_DOMAIN):
1033+
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
10341034
self.fail("Error message validation failed when Domain admin tries to restart network for users not in their domain ")
10351035

10361036
## Test cases relating restart network as regular user
@@ -1061,7 +1061,7 @@ def test_29_restartNetwork_user_foruserinsamedomain(self):
10611061
self.fail("Regular user is allowed to restart network for users in their domain ")
10621062
except Exception as e:
10631063
self.debug("When user tries to restart network for users in their domain %s" % e)
1064-
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
1064+
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
10651065
self.fail("Error message validation failed when Regular user tries to restart network for users in their domain ")
10661066

10671067
@attr("simulator_only", tags=["advanced"], required_hardware="false")
@@ -1077,7 +1077,7 @@ def test_30_restartNetwork_user_foruserinotherdomain(self):
10771077
self.fail("Regular user is allowed to restart network for users not in their domain ")
10781078
except Exception as e:
10791079
self.debug("When user tries to restart network for users in other domain %s" % e)
1080-
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
1080+
if not CloudstackAclException.verifyMsginException(e, CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
10811081
self.fail("Error message validation failed when Regular user is allowed to restart network for users not in their domain ")
10821082

10831083
@staticmethod

test/integration/component/test_acl_isolatednetwork_delete.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def test_deleteNetwork_domaindmin_forcrossdomainuser(self):
455455
self.fail("Domain admin is allowed to delete network for users not in their domain ")
456456
except Exception as e:
457457
self.debug ("When Domain admin tries to delete network for user in a different domain %s" %e)
458-
if not CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_DOMAIN):
458+
if not CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
459459
self.fail("Error message validation failed when Domain admin tries to delete network for users not in their domain ")
460460

461461
## Test cases relating deleting network as regular user
@@ -490,7 +490,7 @@ def test_deleteNetwork_user_foruserinsamedomain(self):
490490
self.fail("Regular user is allowed to delete network for users in their domain ")
491491
except Exception as e:
492492
self.debug ("When user tries to delete network for users in their domain %s" %e)
493-
if not CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
493+
if not CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
494494
self.fail("Regular user is allowed to delete network for users in their domain ")
495495

496496
@attr("simulator_only",tags=["advanced"],required_hardware="false")
@@ -508,7 +508,7 @@ def test_deleteNetwork_user_foruserinotherdomain(self):
508508
self.fail("Regular user is allowed to delete network for users not in their domain ")
509509
except Exception as e:
510510
self.debug ("When user tries to delete network for users in other domain %s" %e)
511-
if not CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_ACCOUNT):
511+
if not CloudstackAclException.verifyMsginException(e,CloudstackAclException.NO_PERMISSION_TO_OPERATE_SOURCE):
512512
self.fail("Error message validation failed when Regular user tries to delete network for users not in their domain ")
513513

514514
@staticmethod

0 commit comments

Comments
 (0)