The CouchDB image used by scripts/run_couchdb_on_travis.sh returns an incorrectly formatted response when sending multiple queries to a view.
Expected Behavior
Response should be an object like this:
results: [ {total_rows:3,offset:0,rows:[{id:"p_derek",key:["Derek","San Francisco"],value:"p_derek"},{id:"p_nuno",key:["Nuno","London"],value:"p_nuno"}]}, {total_rows:3,offset:2,rows:[{id:"p_randall",key:["Randall","San Francisco"],value:"p_randall"}]} ]
Current Behavior
Response is a string like this:
'{"results":[\r\n{"total_rows":3,"offset":0,"rows":[\r\n{"id":"p_derek","key":["Derek","San Francisco"],"value":"p_derek"},\r\n{"id":"p_nuno","key":["Nuno","London"],"value":"p_nuno"}\r\n]},\r\n{"id":"p_randall","key":["Randall","San Francisco"],"value":"p_randall"}\r\n]}\r\n]}\n'
Possible Solution
Change run_couchdb_on_travis.sh and test against a different CouchDB image
(edited for clarity)
Steps to Reproduce (for bugs)
Start the currently used CouchDB docker image:
docker run --ulimit nofile=2048:2048 -d -p 5984:5984 klaemo/couchdb:2.0-dev@sha256:336fd3d9a89475205fc79b6a287ee550d258fac3b62c67b8d13b8e66c71d228f --with-haproxy \ --with-admin-party-please -n 1
Run the test on my fork:
NOCK_OFF=true node tests/integration/design/query.js
The test fails.
Now switch to using the official CouchDB docker image:
docker kill $(docker ps -q)
docker run -d -p 5984:5984 couchdb
Run the test again and it passes
Context
Trying to write tests for multiple query views
Your Environment
Saw this on default AWS Cloud9 dev environment.
The CouchDB image used by scripts/run_couchdb_on_travis.sh returns an incorrectly formatted response when sending multiple queries to a view.
Expected Behavior
Response should be an object like this:
results: [ {total_rows:3,offset:0,rows:[{id:"p_derek",key:["Derek","San Francisco"],value:"p_derek"},{id:"p_nuno",key:["Nuno","London"],value:"p_nuno"}]}, {total_rows:3,offset:2,rows:[{id:"p_randall",key:["Randall","San Francisco"],value:"p_randall"}]} ]Current Behavior
Response is a string like this:
'{"results":[\r\n{"total_rows":3,"offset":0,"rows":[\r\n{"id":"p_derek","key":["Derek","San Francisco"],"value":"p_derek"},\r\n{"id":"p_nuno","key":["Nuno","London"],"value":"p_nuno"}\r\n]},\r\n{"id":"p_randall","key":["Randall","San Francisco"],"value":"p_randall"}\r\n]}\r\n]}\n'
Possible Solution
Change run_couchdb_on_travis.sh and test against a different CouchDB image
(edited for clarity)
Steps to Reproduce (for bugs)
Start the currently used CouchDB docker image:
docker run --ulimit nofile=2048:2048 -d -p 5984:5984 klaemo/couchdb:2.0-dev@sha256:336fd3d9a89475205fc79b6a287ee550d258fac3b62c67b8d13b8e66c71d228f --with-haproxy \ --with-admin-party-please -n 1Run the test on my fork:
NOCK_OFF=true node tests/integration/design/query.jsThe test fails.
Now switch to using the official CouchDB docker image:
docker kill $(docker ps -q)docker run -d -p 5984:5984 couchdbRun the test again and it passes
Context
Trying to write tests for multiple query views
Your Environment
Saw this on default AWS Cloud9 dev environment.