> On June 18, 2014, 3:20 p.m., Santhosh Edukulla wrote:
> > test/integration/component/test_acl_isolatednetwork.py, line 481
> > <https://reviews.apache.org/r/22709/diff/1/?file=612001#file612001line481>
> >
> >     Lot of entities got created, is clean up happening for all of them? I 
> > mean can we double check post running the script from ms server that 
> > nothing was left out, either offerings, vms, accounts etc.

All the resources like accounts,Vms are all created under 2 domains except for 
2 accounts created under ROOT domain which are included in the cleanup object 
that is sent to cleanup_resources method.
 
In tearDownClass, I am deleting both the domains that were created with clean 
option set to "true" which I have made sure as part of test execution cleans up 
all resources under this domain:
            cls.cleanup = [
                        cls.account_root,
                            cls.account_roota,
                            cls.service_offering,
                            ]
In tearDownClass()
        cls.domain_1.delete(cls.apiclient,cleanup="true")
        cls.domain_2.delete(cls.apiclient,cleanup="true")
        cleanup_resources(cls.apiclient, cls.cleanup)


> On June 18, 2014, 3:20 p.m., Santhosh Edukulla wrote:
> > test/integration/component/test_acl_isolatednetwork.py, line 938
> > <https://reviews.apache.org/r/22709/diff/1/?file=612001#file612001line938>
> >
> >     Is it as well a fail scenario if expected exception message is not in 
> > the response? Question: Is receiving an exception message is important or 
> > its content as well? 
> >     
> >

This use case is to validate that Domain admin should not be able allowed to 
deploy vm for users not in his sub domain. We expect the API to error out with 
a specific error message relating to access check failure. So it is important 
that we receive an exception with a certain access check failure message.


> On June 18, 2014, 3:20 p.m., Santhosh Edukulla wrote:
> > test/integration/component/test_acl_isolatednetwork.py, line 939
> > <https://reviews.apache.org/r/22709/diff/1/?file=612001#file612001line939>
> >
> >     Move this inside try block. As well, use self.fail instead of this,it 
> > looks neat to read.

In this case , test case fails when exception is not raised. That is the reason 
why I have the raise AssertionError out side the try block. I will use 
self.fail instead of raising a AssertionError


> On June 18, 2014, 3:20 p.m., Santhosh Edukulla wrote:
> > test/integration/component/test_acl_isolatednetwork.py, line 35
> > <https://reviews.apache.org/r/22709/diff/1/?file=612001#file612001line35>
> >
> >     Move this to test data under marvin/config directory, if possible.

The test data I am using for acl related suites are very large and does not 
overlap with any test data used by all other suites. So my thinking is that it 
would not be ideal to add it to the common file - test_data.py which is common 
to all test suites. 
Is there a way for me to create a test data file specific for acl test cases 
and have my test suite load this specific test data? For this patch I have kept 
the data within the test suite itself.


> On June 18, 2014, 3:20 p.m., Santhosh Edukulla wrote:
> > test/integration/component/test_acl_isolatednetwork.py, line 935
> > <https://reviews.apache.org/r/22709/diff/1/?file=612001#file612001line935>
> >
> >     Is it possible to define all exception entities in CloudStackException 
> > and check for them? Otherwise maintenance will be a bit difficult if we 
> > just search for message? As well, convert to lower() and search.

I will define all the exception entities in codes.py and have a method 
verifyMsginException(exception,message) which will verify that the exception 
has the message.


> On June 18, 2014, 3:20 p.m., Santhosh Edukulla wrote:
> > test/integration/component/test_acl_isolatednetwork.py, line 936
> > <https://reviews.apache.org/r/22709/diff/1/?file=612001#file612001line936>
> >
> >     Better thing is to localize all these check in to a function and pass 
> > exception object and message to verify, define all your exception messages 
> > in class and verify by passing them. EX:
> >     
> >     class ExampleExceptionsToVerify:
> >         ABC="verify abc"
> >         BCD="verify bcd"
> >     
> >     verifyMsginException(e,ExampleExceptionsToVerify.ABC"). This way, all 
> > messages can be handled in one single function and maintenance will be easy?

I will define all the exception entities in codes.py and have a method 
verifyMsginException(exception,message) which will verify that the exception 
has the message.


- sangeetha


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22709/#review46074
-----------------------------------------------------------


On June 18, 2014, 1:28 a.m., sangeetha hariharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22709/
> -----------------------------------------------------------
> 
> (Updated June 18, 2014, 1:28 a.m.)
> 
> 
> Review request for cloudstack, Min Chen, Prachi Damle, and Santhosh Edukulla.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This test suite contains test cases relating to access checks for 
> createNetwork(), deploying VM in an isolated network and restartNetwork() for 
> Admin, domain admin and regular users.
> 
> 
> Diffs
> -----
> 
>   test/integration/component/test_acl_isolatednetwork.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22709/diff/
> 
> 
> Testing
> -------
> 
> test_01_createNetwork_admin 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_01_createNetwork_admin | Status : SUCCESS ===
> ok
> test_02_createNetwork_admin_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_02_createNetwork_admin_foruserinsamedomain | Status : SUCCESS 
> ===
> ok
> test_03_createNetwork_admin_foruserinotherdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_03_createNetwork_admin_foruserinotherdomain | Status : SUCCESS 
> ===
> ok
> test_04_createNetwork_domaindmin 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_04_createNetwork_domaindmin | Status : SUCCESS ===
> ok
> test_05_createNetwork_domaindmin_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_05_createNetwork_domaindmin_foruserinsamedomain | Status : 
> SUCCESS ===
> ok
> test_06_createNetwork_domaindmin_foruserinsubdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_06_createNetwork_domaindmin_foruserinsubdomain | Status : 
> SUCCESS ===
> ok
> test_07_createNetwork_domaindmin_forcrossdomainuser 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_07_createNetwork_domaindmin_forcrossdomainuser | Status : 
> SUCCESS ===
> ok
> test_08_createNetwork_user 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_08_createNetwork_user | Status : SUCCESS ===
> ok
> test_09_createNetwork_user_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_09_createNetwork_user_foruserinsamedomain | Status : SUCCESS 
> ===
> ok
> test_10_createNetwork_user_foruserinotherdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_10_createNetwork_user_foruserinotherdomain | Status : SUCCESS 
> ===
> ok
> test_11_deployvm_admin 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_11_deployvm_admin | Status : SUCCESS ===
> ok
> test_12_deployvm_admin_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_12_deployvm_admin_foruserinsamedomain | Status : SUCCESS ===
> ok
> test_13_1_deployvm_admin_foruserinotherdomain_crossnetwork 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_13_1_deployvm_admin_foruserinotherdomain_crossnetwork | Status 
> : SUCCESS ===
> ok
> test_13_deployvm_admin_foruserinotherdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_13_deployvm_admin_foruserinotherdomain | Status : SUCCESS ===
> ok
> test_14_deployvm_domaindmin 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_14_deployvm_domaindmin | Status : SUCCESS ===
> ok
> test_15_deployvm_domaindmin_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_15_deployvm_domaindmin_foruserinsamedomain | Status : SUCCESS 
> ===
> ok
> test_16_deployvm_domaindmin_foruserinsubdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_16_deployvm_domaindmin_foruserinsubdomain | Status : SUCCESS 
> ===
> ok
> test_17_1_deployvm_domainadmin_foruserinotherdomain_crossnetwork 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_17_1_deployvm_domainadmin_foruserinotherdomain_crossnetwork | 
> Status : SUCCESS ===
> ok
> test_17_deployvm_domaindmin_forcrossdomainuser 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_17_deployvm_domaindmin_forcrossdomainuser | Status : SUCCESS 
> ===
> ok
> test_18_deployvm_user 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_18_deployvm_user | Status : SUCCESS ===
> ok
> test_19_deployvm_user_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_19_deployvm_user_foruserinsamedomain | Status : SUCCESS ===
> ok
> test_20_1_deployvm_user_incrossnetwork 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_20_1_deployvm_user_incrossnetwork | Status : SUCCESS ===
> ok
> test_20_deployvm_user_foruserincrossdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_20_deployvm_user_foruserincrossdomain | Status : SUCCESS ===
> ok
> test_21_restartNetwork_admin 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_21_restartNetwork_admin | Status : SUCCESS ===
> ok
> test_22_restartNetwork_admin_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_22_restartNetwork_admin_foruserinsamedomain | Status : SUCCESS 
> ===
> ok
> test_23_restartNetwork_admin_foruserinotherdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_23_restartNetwork_admin_foruserinotherdomain | Status : 
> SUCCESS ===
> ok
> test_24_restartNetwork_domaindmin 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_24_restartNetwork_domaindmin | Status : SUCCESS ===
> ok
> test_25_restartNetwork_domaindmin_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_25_restartNetwork_domaindmin_foruserinsamedomain | Status : 
> SUCCESS ===
> ok
> test_26_restartNetwork_domaindmin_foruserinsubdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_26_restartNetwork_domaindmin_foruserinsubdomain | Status : 
> SUCCESS ===
> ok
> test_27_restartNetwork_domaindmin_forcrossdomainuser 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_27_restartNetwork_domaindmin_forcrossdomainuser | Status : 
> SUCCESS ===
> ok
> test_28_restartNetwork_user 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_28_restartNetwork_user | Status : SUCCESS ===
> ok
> test_29_restartNetwork_user_foruserinsamedomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_29_restartNetwork_user_foruserinsamedomain | Status : SUCCESS 
> ===
> ok
> test_30_restartNetwork_user_foruserinotherdomain 
> (integration.component.test_acl_isolatednetwork.TestIsolatedNetwork) ... === 
> TestName: test_30_restartNetwork_user_foruserinotherdomain | Status : SUCCESS 
> ===
> ok
> 
> ----------------------------------------------------------------------
> Ran 33 tests in 256.713s
> 
> OK
> 
> 
> Thanks,
> 
> sangeetha hariharan
> 
>

Reply via email to