tmp-postgres: Start and stop a temporary postgres for testing

[ bsd3, library, program, web ] [ Propose Tags ]

This module provides functions greating 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

The are few different methods for starting postgres which provide different methods of dealing with stdout and stderr.

The start methods use a config based on the one used by pg_tmp, but can be overriden by in different values to the first argument of the start functions.


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6, 0.1.0.7, 0.1.0.8, 0.1.1.0, 0.1.1.1, 0.1.2.0, 0.1.2.1, 0.1.2.2, 0.2.0.0, 0.3.0.0, 0.3.0.1, 1.0.0.0, 1.0.0.1, 1.0.0.2, 1.0.1.0, 1.2.0.0, 1.2.0.1, 1.2.1.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 1.6.0.0, 1.7.0.0, 1.7.0.1, 1.7.1.0, 1.8.0.0, 1.9.0.0, 1.9.0.1, 1.9.0.2, 1.10.0.0, 1.11.0.0, 1.12.0.0, 1.12.0.1, 1.13.0.0, 1.13.1.0, 1.13.1.1, 1.13.1.2, 1.14.0.0, 1.14.0.1, 1.14.1.0, 1.15.0.0, 1.15.1.0, 1.15.1.1, 1.16.0.0, 1.16.1.0, 1.17.0.0, 1.18.0.0, 1.19.0.0, 1.19.0.1, 1.20.0.0, 1.20.0.1, 1.21.0.0, 1.21.1.0, 1.21.1.1, 1.22.0.0, 1.23.0.0, 1.23.0.1, 1.23.0.2, 1.23.0.3, 1.24.0.0, 1.25.0.0, 1.25.0.1, 1.26.0.0, 1.27.0.0, 1.27.0.1, 1.27.0.2, 1.27.0.3, 1.27.0.4, 1.28.0.0, 1.28.1.0, 1.29.0.0, 1.29.0.1, 1.30.0.0, 1.30.0.1, 1.31.0.0, 1.31.0.1, 1.31.0.2, 1.31.0.3, 1.32.0.0, 1.32.0.1, 1.33.0.0, 1.34.0.0, 1.34.0.1, 1.34.1.0
Dependencies base (>=4.7 && <5), directory, network, process, temporary, unix [details]
License BSD-3-Clause
Copyright 2017 Jonathan Fischoff
Author Jonathan Fischoff
Maintainer jonathangfischoff@gmail.com
Category Web
Home page https://github.com/jfischoff/tmp-postgres#readme
Source repo head: git clone https://github.com/jfischoff/tmp-postgres
Uploaded by JonathanFischoff at 2017-06-17T04:04:09Z
Distributions LTSHaskell:0.1.2.2, NixOS:1.34.1.0, Stackage:0.2.0.0
Downloads 26352 total (46 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-06-17 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for tmp-postgres-0.1.0.2

[back to package description]

Travis CI Status

tmp-postgres

tmp-postgres is a libary for greating 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