tree: 3e17ca84603e712dbebf6bb6c79cf8d2ae015b5d [path history] [tgz]
  1. 01-index-crud-test.py
  2. 02-basic-find-test.py
  3. 03-operator-test.py
  4. 04-key-tests.py
  5. 05-index-selection-test.py
  6. 06-basic-text-test.py
  7. 06-text-default-field-test.py
  8. 07-text-custom-field-list-test.py
  9. 08-text-limit-test.py
  10. 09-text-sort-test.py
  11. 10-disable-array-length-field-test.py
  12. 11-ignore-design-docs-test.py
  13. 12-use-correct-index-test.py
  14. 13-stable-update-test.py
  15. 13-users-db-find-test.py
  16. 14-json-pagination-test.py
  17. 15-execution-stats-test.py
  18. 16-index-selectors-test.py
  19. 17-multi-type-value-test.py
  20. 18-json-sort.py
  21. 19-find-conflicts.py
  22. 20-no-timeout-test.py
  23. friend_docs.py
  24. limit_docs.py
  25. mango.py
  26. README.md
  27. user_docs.py
src/mango/test/README.md

Mango Tests

CouchDB should be started with ./dev/run -a testuser:testpass.

To run these, do this in the Mango top level directory:

$ python3 -m venv venv
$ . venv/bin/activate
$ pip3 install -r requirements.txt
$ venv/bin/nosetests

To run an individual test suite: nosetests --nocapture test/12-use-correct-index.py

To run the tests with text index support: MANGO_TEXT_INDEXES=1 nosetests --nocapture test

Test configuration

The following environment variables can be used to configure the test fixtures:

  • COUCH_HOST - root url (including port) of the CouchDB instance to run the tests against. Default is "http://127.0.0.1:15984".
  • COUCH_USER - CouchDB username (with admin premissions). Default is "testuser".
  • COUCH_PASSWORD - CouchDB password. Default is "testpass".
  • COUCH_AUTH_HEADER - Optional Authorization header value. If specified, this is used instead of basic authentication with the username/password variables above.
  • MANGO_TEXT_INDEXES - Set to "1" to run the tests only applicable to text indexes.