BSD-3-Clause licensed by Jonathan Fischoff
Maintained by [email protected]
This version can be pinned in stack with:tmp-postgres-0.1.1.1@sha256:0c92fa7def29c319d46dd55ec6e06293da68cb296388a8b59e8c2bce0fe81c00,2473

Module documentation for 0.1.1.1

Travis CI Status

tmp-postgres

tmp-postgres is a library for creating a temporary postgres instance on a random port for testing.

result <- start []
case result of
  Left err -> print err
  Right tempDB -> do
     -- Do stuff
     stop tempDB

Installation

macOS

$ brew install postgres
$ stack install tmp-postgres

Ubuntu

Ubuntu’s PostgreSQL installation does not put initdb on the PATH. We need to add it manually.

$ sudo apt-get install postgresql-VERSION
$ echo "export PATH=$PATH:/usr/lib/postgresql/VERSION/bin/" >> /home/ubuntu/.bashrc
$ stack install tmp-postgres