Merge lp:~adiroiban/couchdb-glib/couchdb-test-setup into lp:couchdb-glib
Status: | Merged |
---|---|
Approved by: | Rodrigo Moya |
Approved revision: | 180 |
Merge reported by: | Rodrigo Moya |
Merged at revision: | not available |
Proposed branch: | lp:~adiroiban/couchdb-glib/couchdb-test-setup |
Merge into: | lp:couchdb-glib |
Diff against target: |
95 lines (+64/-2) 3 files modified
tests/Makefile.am (+31/-2) tests/config/couchdb-auth.ini (+29/-0) tests/test-couchdb-glib.c (+4/-0) |
To merge this branch: | bzr merge lp:~adiroiban/couchdb-glib/couchdb-test-setup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Rodrigo Moya (community) | Approve | ||
Review via email: mp+22886@code.launchpad.net |
Commit message
Add setUp and tearDown of CouchDB server for couchdb-glib tests.
Description of the change
= Bug 556671 =
When running the couchdb-glib tests, the testsuite should setUp and tearDown the an empty
couchdb server
== Proposed fix ==
Before running the couchdb-glib test, the Makefile should first setup and empty CouchDB used just for testing and when the test are done to tear down the server.
== Implementation details ==
The new server is using the configuration from tests/config/
It is using a predefined username/password and hostname/port_nr.
I have also fixed the name used for creating a new database since UUID can start with a number, while couchdb db names not.
Maybe we should change the port_nr used for testing to not be the default port.
hmm, doesn't seem to work for me:
$ cd tests var/couchdb. stdout
$ make test
Setting up the couchdb server...
Apache CouchDB needs write permission on the STDOUT file: ../tests/
make: *** [test] Error 1
Also, I think we should do the cleanup after running the tests, that is, what there is in stop-couchdb rule should go after running test-desktopcou ch-glib
Anyway, this is a very needed branch, so thanks!