DESCRIPTION

CBQE-175: Test Cases for DDoc

Change-Id: I2f2ad7206ed24ce196e61703ec2ed964aaeebe95


COMMENTS

author: Maliyah Fischer
date: 2012-06-14 14:38:23.498000000

Uploaded patch set 3.

-------------------------------------
author: Hugo Blankenship
date: 2012-06-14 14:38:26.905000000

Patch Set 3:

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

-------------------------------------
author: Hugo Blankenship
date: 2012-06-14 14:47:13.720000000

Patch Set 3: Verified

Build Successful 

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

-------------------------------------
author: Esperanza Cherry
date: 2012-06-14 19:20:48.304000000

Patch Set 3: Do not submit

(15 inline comments)



Line:1, conf/py-ddoc.conf -> better to use such format here:
view.createddoc.CreateDDocTests
     test_create_ddoc_basic,ddoc_name=design
     ..........................

Line:5, conf/py-ddoc.conf -> there are no test_create_ddoc_invalid_name in CreateDDocTests

Line:6, conf/py-ddoc.conf -> keep scenario for the same method  together

Line:26, pytests/view/createddoc.py -> #1 add self.default_ddoc_name in ViewBaseTest, you can use it everywhere

Line:27, pytests/view/createddoc.py -> remove

Line:39, pytests/view/createddoc.py -> not needed if you do as in #1

Line:40, pytests/view/createddoc.py -> #2 why not self.default_view? is not required in this case

Line:44, pytests/view/createddoc.py -> if #1+#2 DesignDocument(self.default_ddoc_nam, [self.default_view])

Line:50, pytests/view/createddoc.py -> remove

Line:54, pytests/view/createddoc.py -> #3 we should check that our ddoc was updated, that only "_rev" was changed?
INFO - Document dev_Doc1 details : {"_rev": "1-2b41d40b", "_id": "_design/dev_Doc1", "views": {"view1": {"map": "function (doc) { emit(null, doc);}"}}}
INFO - Document dev_Doc1 details : {"_rev": "2-8d2ee6de", "_id": "_design/dev_Doc1", "views": {"view1": {"map": "function (doc) { emit(null, doc);}"}}}

Line:55, pytests/view/createddoc.py -> these tests can be combined if add same_view =self.input.param("same_vew", "True")

Line:72, pytests/view/createddoc.py -> this test doesn't work properly, create_design_document update ddoc fully. we should  check that its views and "_rev" param changed ( #3)

Line:97, pytests/view/createddoc.py -> it works like: Once created, then update
I think will be fine so:
for i in range(10):
 self.create_views(server, design_doc_name + str(i), views)

Line:115, pytests/view/createddoc.py -> i think we should check list of expected dds using rest_client.get_ddoc(). 
get_ddoc should be slightly modify: return json, status

Line:124, pytests/view/createddoc.py -> the same as above

-------------------------------------
author: Titus Ho
date: 2012-06-14 21:27:48.815000000

Patch Set 3:

Just from a big picture perspective, you should still use ViewCreateTask.   I can make it so that if you pass in view=None, then only ddoc will be created.  

The reason why there isn't a DesignDocCreateTask is because the UI doesn't really support this initial state, but you can eventually get to this state by deleting views - which is another way to go about it.

-------------------------------------
author: Maliyah Fischer
date: 2012-06-20 21:54:37.485000000

Patch Set 3: Abandoned

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