DESCRIPTION

Add tests for n1ql rbac upgrade

Change-Id: I209177b06f5097c758e7e6e64413c5540a8d934c


COMMENTS

author: Monique Barker
date: 2017-07-11 05:02:52.033000000

Uploaded patch set 3.

-------------------------------------
author: Monique Barker
date: 2017-07-11 17:03:13.154000000

Patch Set 3: Verified+1

-------------------------------------
author: Monique Barker
date: 2017-07-11 17:04:01.993000000

Patch Set 3: Code-Review+2

-------------------------------------
author: Monique Barker
date: 2017-07-11 17:04:06.221000000

Removed Code-Review+2 by Monique Barker <Monique xxx@xxx.xxx


-------------------------------------
author: Reece Chase
date: 2017-07-11 17:06:39.916000000

Patch Set 3: Code-Review+2

-------------------------------------
author: Ean Andrews
date: 2017-07-12 09:14:13.972000000

Patch Set 3: Code-Review-2

(3 comments)

Tests look good, they have the right flow. I have 3 comments. Few more
a) Keep all the helper functions on top or bottom of the tests
b) Can some constants help to modularize it better e.g. you are running insert command in lot of functions, can you just have small wrapper around insert than you simply call, and thus removes the redundancy. Same can be applied to all statements that you are executing.

Line:92, pytests/2i/upgrade_n1qlrbac.py -> Can you also cover bucket_admin[*} and bucket_admin post upgrade as well. Once will specific to bucket and one has access to all buckets.

Line:505, pytests/2i/upgrade_n1qlrbac.py -> would the current methods used work when cluster is in mixed mode.

Line:635, pytests/2i/upgrade_n1qlrbac.py -> Can you also check for conditions for query_select[*] too along with buckets.

-------------------------------------
author: Monique Barker
date: 2017-07-13 16:56:11.995000000

Patch Set 3:

(3 comments)

I have fixed b.
For a:There is already a query_select_insert_update_delete_helper method in code.Each method is verifying different results.The common code has already been put in helper functions.Also replied to your comments in the rest of the code review.

Line:92, pytests/2i/upgrade_n1qlrbac.py -> query_select_insert_update_delete_helper covers bucket_admin already .There is nothing like bucket_admin[*] from query aspect.It was removed.if bucket_admin is required on all buckets then it is created with comma separated permissions.Please check with Johan on this.

Line:505, pytests/2i/upgrade_n1qlrbac.py -> They should work if the called functions inside them work.Each upgrade function here calls the 2i base upgrade function.If the 2i code works for mixed node then all these functions will work for mixed node.

Line:635, pytests/2i/upgrade_n1qlrbac.py -> query_select on * or query_select[*] is still under discussion based on a bug.I can add the check but it will fail for now.

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