DESCRIPTION

CBQE-2566
1. Updated REST commands as per API.
2. Added test cases to cover - addition + removal + append users as ROAdmin, fullAdmin and Both
3. Added test cases to cover checking of wildcard for ROAdmin and fullAdmin
CBQE-2565 - Initial tests for checking credentials
Change-Id: I3d343ccf75dc748396661d3c38a3d07ef9928cdc


COMMENTS

author: Ean Andrews
date: 2015-01-20 08:37:11.526000000

Uploaded patch set 4.

-------------------------------------
author: Hugo Blankenship
date: 2015-01-20 08:37:18.969000000

Patch Set 4:

Build Started http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/3849/

-------------------------------------
author: Hugo Blankenship
date: 2015-01-20 08:51:23.474000000

Patch Set 4: Verified+1

Build Successful 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/3849/ : SUCCESS

-------------------------------------
author: Fisher Vargas
date: 2015-01-20 13:52:50.025000000

Patch Set 4:

(12 comments)

Line:13, pytests/security/ldaptest.py -> What is this statement means?

Line:50, pytests/security/ldaptest.py -> space after comma. Please see at other places, or apply code format on eclipse.

Line:90, pytests/security/ldaptest.py -> list comprehension?

Line:126, pytests/security/ldaptest.py -> It could be replaced with 

if (self.authRole in ['fullAdmin', 'Both']):
     ....
elif (self.authRole in ['roAdmin', 'Both']):
    ....

Line:158, pytests/security/ldaptest.py -> It could be replaced with 

if (self.authRole in ['fullAdmin', 'Both']):
     ....
elif (self.authRole in ['roAdmin', 'Both']):
    ....

Line:181, pytests/security/ldaptest.py -> It could be replaced with 

if (self.authRole in ['fullAdmin', 'Both']):
     ....
elif (self.authRole in ['roAdmin', 'Both']):
    ....

Please see at other places too.

Line:273, pytests/security/ldaptest.py -> It could be replaced with 

if (self.authRole in ['fullAdmin', 'Both']):
     ....
elif (self.authRole in ['roAdmin', 'Both']):
    ....

Line:283, pytests/security/ldaptest.py -> No need of this.

Line:300, pytests/security/ldaptest.py -> Why "*".? Use named keyword arguments always for default arguments.. e.g. 

rest.ldapUserRestOperation(self.authState,adminUser=self.fullAdmin,ROadminUser='*').

Line:2440, lib/membase/api/rest_client.py -> There is no need for self.---? this could be authOperation, currAdmins, since we are passing them as parameter.

Line:2443, lib/membase/api/rest_client.py -> If statement has no effect. It could be:

if !adminUser:
    for user in adminUser:
        currAdmins = user[0]......

Line:2515, lib/membase/api/rest_client.py -> /validateCredentials?

-------------------------------------
author: Ean Andrews
date: 2015-01-20 15:38:59.109000000

Patch Set 4:

(11 comments)

Covered all comments from Sangarsh and adding a new version of file.

Line:13, pytests/security/ldaptest.py -> Done

I will remove this statement. I have used it from one of the scripts

Line:50, pytests/security/ldaptest.py -> Sangarsh, I have put in the recommendation that you had for code format in eclipse. For now I would like to skip this and have it done offline with you.

Line:90, pytests/security/ldaptest.py -> Haven't got chance to research on this. For now since it is single line, I will let it be as it is.

Line:126, pytests/security/ldaptest.py -> Done

Line:158, pytests/security/ldaptest.py -> Done

Line:181, pytests/security/ldaptest.py -> Done

Line:273, pytests/security/ldaptest.py -> Done

Line:300, pytests/security/ldaptest.py -> Done

Support for wildcard character is part of the test case. In ldap if you use a * all users part of the role get the role assignment automatically.

Line:2440, lib/membase/api/rest_client.py -> Done

Line:2443, lib/membase/api/rest_client.py -> Done

I tried using not operator and even check if not adminUser, but id not work. i have make an explicit check to empty string.

Thanks

Line:2515, lib/membase/api/rest_client.py -> There is actually no need of "/", it is automatically put by baseURL. Other places I have just used out of habit.
Thanks

-------------------------------------
author: Tate Garrett
date: 2015-01-21 06:49:04.793000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

-------------------------------------
author: Tate Garrett
date: 2015-01-21 06:49:18.539000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

-------------------------------------
