Permalink
Switch branches/tags
v2.5.1.4 pool-conduit/0.1.2.3 pool-conduit/0.1.2.2 pool-conduit/0.1.2.1 pool-conduit/0.1.2 pool-conduit/0.1.1 persitent-template/2.1.5 persitent-mongoDB/2.5.0.1 persistent/2.6 persistent/2.2.4.1 persistent/2.2.4 persistent/2.2.3 persistent/2.2.2.1 persistent/2.2.2 persistent/2.2.1 persistent/2.2 persistent/2.1.6 persistent/2.1.4 persistent/2.1.2 persistent/2.1.1.6 persistent/2.1.1.5 persistent/2.1.1.3 persistent/2.1.1.2 persistent/2.1.1.1 persistent/2.1.1 persistent/2.1.0.1 persistent/2.1 persistent/2.0.8 persistent/2.0.7 persistent/2.0.5.1 persistent/2.0.5 persistent/2.0.4 persistent/2.0.3.1 persistent/2.0.3 persistent/2.0.2 persistent/2.0.1.1 persistent/2.0.1 persistent/2.0.0.1 persistent/2.0.0 persistent/1.3.3 persistent/1.3.2 persistent/1.3.1.1 persistent/1.3.1 persistent/1.3.0.6 persistent/1.3.0.5 persistent/1.3.0.4 persistent/1.3.0.3 persistent/1.3.0.2 persistent/1.3.0 persistent/1.2.3.3 persistent/1.2.3.2 persistent/1.2.1.1 persistent/1.2.1 persistent/1.2.0.1 persistent/1.2.0 persistent/1.1.5.1 persistent/1.1.5 persistent/1.1.4 persistent/1.1.3.2 persistent/1.1.3.1 persistent/1.1.3 persistent/1.1.2 persistent/1.1.0.1 persistent/1.1.0 persistent/1.0.2.2 persistent/1.0.2.1 persistent/1.0.2 persistent/1.0.1.3 persistent/1.0.1.2 persistent/1.0.1.1 persistent/1.0.1 persistent/1.0.0 persistent/0.9.0.4 persistent/0.9.0.3 persistent/0.9.0 persistent/0.5.1 persistent/0.5.0 persistent/0.4.2 persistent/0.4.1 persistent/0.4.0.1 persistent/0.4.0 persistent/0.3.1.1 persistent/0.3.1 persistent/0.3.0.1 persistent/0.3.0 persistent/0.2.4 persistent/0.2.3 persistent/0.2.2.2 persistent/0.2.2.1 persistent/0.2.2 persistent/0.2.1 persistent/0.2.0.2 persistent/0.2.0.1 persistent/0.2.0 persistent/0.1.0 persistent/0.0.0.1 persistent/0.0.0 persistent-template/2.5.2 persistent-template/2.1.7 persistent-template/2.1.6
Nothing to show
Find file
99694ad Jul 19, 2016
@gregwebs @psibi @mrkkrp @erikd
63 lines (33 sloc) 1.76 KB

Running persistent tests using Stack

For testing specific package:

stack test persistent-sqlite

For appropriate backend specific testing using the package persistent-test:

stack test persistent-test --flag persistent-test:<backend>

where is one of mongodb/postgresql/mysql/couchdb.

Running persistent tests using Cabal

All tests are ran from the persistent-test directory

cd persistent-test

Use cabal

cabal configure --enable-tests

If you would like to configure tests with a specific backend that can be enabled using

cabal configure -f<backend> --enable-tests

where is one of mongodb/postgresql/mysql/couchdb.

Now run with

cabal build && dist/build/test/test

Backends

By default the sqlite backend is tested. To test other backends, you can give a flag described in persisten-test.

cabal configure -fmongodb --enable-tests

Installing backends

You can develop just against your preferred backend and the community should help sort out issues with others.

However, we have a Dockerfile that you can use to install all the databases.

docker build -t persistent .
docker run -d --name postgres postgres:9.3.5
docker run --link postgres:postgres --name persistent -v `pwd`:/home/haskell -t -i persistent /bin/bash

This only works on Linux, but you can use Linux on Mac or Windows through Virtualbox.

After building you still need to start up the databases in the background (other than sqlite) that you are testing. For example:

mongod --smallfiles &

Docker does not support upstart so just because you install a database does not mean it will be running. You must launch each one in the background.

If someone can contribute information on how to run persistent or MySQL that would be appreciated.