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

Pass the PouchDB test suite #59

@nolanlawson

Description

@nolanlawson

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!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions