Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Pass the PouchDB test suite #59

Open
nolanlawson opened this issue Nov 15, 2015 · 1 comment
Open

Pass the PouchDB test suite #59

nolanlawson opened this issue Nov 15, 2015 · 1 comment
Assignees
Milestone

Comments

@nolanlawson
Copy link

Cool project! 😃 Thought I would give you some pointers about how to run and pass the PouchDB test suite, since it's a pretty good way to determine whether or not you fully implement the CouchDB API. (For the record, Cloudant and PouchDB Server are passing, and Couchbase Sync Gateway passes most of it. Not sure about rsync or Drupal Relaxed Web Services.)

To run the test suite:

git clone https://github.com/pouchdb/pouchdb.git
cd pouchdb
npm install
BAIL=0 COUCH_HOST=http://127.0.0.1:5994 npm test

(BAIL=0 tells the test suite not to bail at the first test, which is good for debugging.)

First thing that's not passing: you need to enable HEAD requests against /. Otherwise the PouchDB tests will not even start, because they think the server is down. (You'll see: Waiting for host to start ..... Host failed to start.

Second thing that's not passing: _all_docs is not passing all tests; see test output for details. Seems related to key/keys/include_docs. Note that keys has different behavior for the other options; you need to include the deleted docs in order for it to pass.

Third thing that's not passing: attachments. See test.attachments.js tests for details. PouchDB doesn't do multipart, so you just need to support base64 with application/json.

Fourth thing: _bulk_docs with new_edits=false. This is basically required for replication to function correctly, but it's kind of tricky.

Fifth thing: _changes - not implemented yet?

There are some other failures, but the steps above should give you a good starting point. The tests are all located in tests/integration, and you can also follow our testing instructions in TESTING.md to run them one at a time. Let me know or cc @daleharvey if you need any guidance!

@craigminihan
Copy link
Contributor

@nolanlawson thanks for taking the time to check out Avance. You already have a good handle on CouchDB bits it doesn't do. I'm backfilling these as I get time.

I just added a HEAD / and will check out the _all_docs and _bulk_docs issues which seem to fail.

I've not implemented any of _changes or attachments yet - so it wasn't a surprise to see the tests all go red.

TBH I'm glad it didn't segfault!

@craigminihan craigminihan added this to the 0.2 milestone Nov 17, 2015
@craigminihan craigminihan self-assigned this Nov 17, 2015
@craigminihan craigminihan modified the milestones: 1.0, 0.2 Dec 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants