Sunday, December 2, 2012

Configuring CouchDB for Travis CI

Today I made a new release on the DPLA platform that updated requests for single records. I added some new cucumber integration steps that passed locally but broke the Travis CI build.

The new record "Fetch" mechanism is performing a fetch on CouchDB after doing a simple "transformation" on the requested record ID. The id for the CouchDB is pulled from an ID assigned at the time of ingestion and indexed in ElasticSearch.

The new method and integration tests require hitting CouchDB, so fixing the build entailed enabling CouchDB in Travis. Check out the commit with the new Travis configuration here.

Instructions for setting up the CouchDB service in Travis can be found here. To get the DPLA platform configuration set up correctly for the test suite, I needed to ensure we had an Admin user set up in CouchDB, which was different from the vanilla CouchDB setup with Travis. The final solution entailed a small change to the config files so the search endpoint can be defined independent of the test environment.

No comments:

Post a Comment