DESCRIPTION

CBQE-62: pre-store expected query results

This will allow for better verification and
easier debugging when errors occur  during viewquery tests.

Id's of all docs used in each test are stored into a multi-level
dictionary.  After data is loaded, we create expected result
arrays for each query based on the params that are defined.

Change-Id: I0568dce6dc8a59f7306acb9a982397ef4738983c


COMMENTS

author: Titus Ho
date: 2012-05-16 21:59:12.772000000

Uploaded patch set 2.

-------------------------------------
author: Hugo Blankenship
date: 2012-05-16 22:04:36.120000000

Patch Set 2:

Build Started http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/242/ 

-------------------------------------
author: Hugo Blankenship
date: 2012-05-16 22:09:53.203000000

Patch Set 2: Verified

Build Successful 

http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/242/ : SUCCESS

-------------------------------------
author: Esperanza Cherry
date: 2012-05-18 01:34:03.535000000

Patch Set 2: I would prefer that you didn't submit this

(4 inline comments)

Tommie, I guess code in comments should be applied for this commit. It works for me with such changes.

Line:799, pytests/viewquerytests.py -> +        if query.type_ == "all_docs":

+            if 'start_key' in query.params:

+                query.params['startkey_docid'] = query.params['start_key']

+                del query.params["start_key"]

+            if 'end_key' in query.params:

+                query.params['endkey_docid'] = query.params['end_key']

+                del query.params['end_key']

should be added if type == "all_docs"

Line:896, pytests/viewquerytests.py -> startkey_docid = query.params['startkey_docid'].replace("\"","")

parameters in view.queries are passed with double quotes

Line:901, pytests/viewquerytests.py -> endkey_docid = query.params['endkey_docid'].replace("\"","")

Line:907, pytests/viewquerytests.py -> +        # revert them back in case query.type_ == "all_docs"

+        if query.type_ == "all_docs":

+            if 'startkey_docid' in query.params:

+                query.params['start_key'] = 
query.params['startkey_docid']

+                del query.params["startkey_docid"]

+            if 'endkey_docid' in query.params:

+                query.params['end_key'] = query.params['endkey_docid']

+                del query.params['endkey_docid']

-------------------------------------
author: Titus Ho
date: 2012-05-30 20:25:25.522000000

Patch Set 2: Looks good to me, approved

Thanks Andrei, I've fixed all_docs case in change,16501

-------------------------------------
author: Tate Garrett
date: 2012-05-30 20:25:39.394000000

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

Please merge (or rebase) the change locally and upload the resolution for review.

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