pg-harness-0.1.0: pg-harness.cabal
Name: pg-harness
Version: 0.1.0
Synopsis: REST service for creating temporary PostgreSQL databases
Description:
This is a REST service for conveniently creating temporary PostgreSQL
databases. It is intended for use from tests.
.
Simply install, update the configuration INI file to
suit your setup, and run as a system service (e.g.
via systemd, upstart or similar) -- see the @SETUP.txt@
file for details on what is required of the database
setup.
.
Once the service is running you can do a HTTP POST
to it to create a temporary database. For example,
.
> $ curl -d '' http://localhost:8900
> pg-harness-test:pg-harness-pass@db:5432/temp_ba36rk6rqvs92wbofk55sz5k3pcl0u74x
.
The response indicates that the temporary database "@temp_ba36rk6rqvs92wbofk55sz5k3pcl0u74x@"
has been created on the database server "@db@" (port 5432) and made available
to the user "@pg-harness-test@" using the password "@pg-harness-pass@".
.
The database will automatically be destroyed after a configurable duration,
though any temporary databases that have not been destroyed when the service
is stopped will stay around.
.
__NOTE__: No attempt has been made to prevent DoS attacks, so you should __NOT__
run this on any network facing the public Internet. It is only meant for
development LANs which are firewalled off.
License: AGPL-3.0
License-file: doc/agpl-3.0.txt
Author: Bardur Arantsson
Maintainer: spam@scientician.net
Copyright: Copyright (c) 2014 Bardur Arantsson
Category: Database Testing Web
Build-type: Simple
Cabal-version: >=1.10
Data-dir: data
Data-files: pg-harness.ini
Executable pg-harness
Main-is: Main.hs
Ghc-options: -Wall
Build-depends: base == 4.*
, async >= 2.0.1.5 && < 3
, ini >= 0.2 && < 0.3
, postgresql-simple >= 0.4.2 && < 0.5
, random >= 1.0 && < 1.1
, scotty >= 0.7.0 && < 0.8
, text >= 1.1.0 && < 2
, transformers >= 0.4.1 && < 0.5
Default-extensions: LambdaCase
OverloadedStrings
ScopedTypeVariables
Hs-source-dirs: src
Default-language: Haskell2010
Other-modules: Paths_pg_harness
PgHarness.Configuration
PgHarness.Mutex
PgHarness.DatabaseId