DESCRIPTION

Adding more test cases for LDAP, refactored code in rest_client.py. There is still some work pending for having LDAP config in ini file and dynamic adding of LDAP users.
Removed skip_rebalance and skip_cleanup from conf file
Change-Id: I6e1f95de75cc7ad35a8b759fe45750c917cd3404


COMMENTS

author: Ean Andrews
date: 2015-01-09 07:29:50.503000000

Uploaded patch set 7.

-------------------------------------
author: Hugo Blankenship
date: 2015-01-09 07:29:54.300000000

Patch Set 7:

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

-------------------------------------
author: Hugo Blankenship
date: 2015-01-09 07:43:56.355000000

Patch Set 7: Verified+1

Build Successful 

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

-------------------------------------
author: Trevor Santana
date: 2015-01-09 08:22:57.640000000

Patch Set 7:

(15 comments)

Line:120, pytests/security/ldaptest.py -> assertTrue

Line:125, pytests/security/ldaptest.py -> assertTrue

Line:130, pytests/security/ldaptest.py -> don't use async rebalance if you don't want to use it in parallel, just use self.cluster.rebalance

Line:133, pytests/security/ldaptest.py -> assertFalse

Line:137, pytests/security/ldaptest.py -> same

Line:565, pytests/security/ldaptest.py -> add finally block
in your case if you have an exception it won't be disconnected and connection will be kept alive

Line:579, pytests/security/ldaptest.py -> same

Line:591, pytests/security/ldaptest.py -> for next commit : please use regexp for that things

Line:619, pytests/security/ldaptest.py -> list2_usernames = [user.userName for user in list2] list1 == list2_usernames

Line:620, pytests/security/ldaptest.py -> less code is more readable, but is up to you

Line:2448, lib/membase/api/rest_client.py -> value is not defined at this point

Line:2455, lib/membase/api/rest_client.py -> no need in else statement, currAdmins are defined in the top of function and they are not changed

Line:2471, lib/membase/api/rest_client.py -> Sangharsh's comment from 5th patch set. Delete assignments

Line:2501, lib/membase/api/rest_client.py -> less code is always better, just return your expression, there is no need to put if else block

Line:2518, lib/membase/api/rest_client.py -> there is no need to do json.loads(). Content is a string

-------------------------------------
author: Ean Andrews
date: 2015-01-09 09:36:00.597000000

Patch Set 7:

(15 comments)

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

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

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

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

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

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

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

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

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

Line:620, pytests/security/ldaptest.py -> Done
I feel this is more readable for me.
thanks
Ritam

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

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

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

Line:2501, lib/membase/api/rest_client.py -> I thought of removing it, but I explicitly check for status 200 and 400, if there is a 500 it should fail. 
The logic is correct here.

Line:2518, lib/membase/api/rest_client.py -> There is actually a difference between what is returned as string and what is returned json.loads. Since I am capturing the actual response from the http command, this is needed. I have put this on purpose.

-------------------------------------
author: Trevor Santana
date: 2015-01-09 10:28:43.013000000

Patch Set 7:

(2 comments)

Line:619, pytests/security/ldaptest.py -> what is done? nothing is changed

Line:620, pytests/security/ldaptest.py -> this will be eliminated if first comment will de addressed

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