DESCRIPTION

WIP adding capi view functions to testrunner rest_client

added create_view,get_view and delete_view and run_view to
RestConnection class
usage example :
capi = RestConnection(server)
function = "{\"_id\": \"_design/test\",\"views\": {\"stuff\": {\"map\": \"function (doc) { emit([doc.id], 99); }\"}}}"
capi.create_view("default","myview",function)
capi.get_view("default","myview")
capi.delete_view("default","myview")

Change-Id: I35326c5f3fc2fa8ce10004c47d0da187cae5afb5


COMMENTS

author: Zackery Barr
date: 2011-07-16 15:06:43.261000000

Uploaded patch set 5.

-------------------------------------
author: Porter Oconnor
date: 2011-07-16 21:04:39.639000000

Patch Set 5:

A few questions:

1) After calling the view URLs why do you test only for 2 http status codes (200/201 and 400)? Under different scenarios, Couch/CAPI can return an error code other than 400. So it makes sense to me to log an error and throw exception if status is anything else other than 200/201;

2) I see some membase auto fail over changes included. I know little about membase, but why are they in this commit? Are they necessary for the view creation/execution tests? If not related, they should be a separate commit.

3) The delete_view seems ok to me, but I haven't run the code. Maybe it's not supposed yet to work due to changes needed in CAPI. I'll look at it.

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