Re: Binding Postgres to port 0 for testing - Mailing list pgsql-general

From Thorsten Glaser
Subject Re: Binding Postgres to port 0 for testing
Date
Msg-id bf4adb88-a0f5-635e-e778-c97ff8f31a91@evolvis.org
Whole thread Raw
In response to Binding Postgres to port 0 for testing  (Markus Pilman <markus@pilman.ch>)
List pgsql-general
Hi Markus,

>I am building a simple integration test framework for an application that I
>am building. For this project I am planning to use PostgreSQL.

check pg_virtualenv(1), which apparently is a Debian thing.
It auto-creates and auto-deletes at the end, if desired, a
cluster and runs your program with suitable environment
variables to access that cluster, which includes choosing
an available port. This was in fact made for integration
testing, though I use it for quickly spinning up throwaway
DBs for one-shot tools as well.

bye,
//mirabilos
--
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

                        ****************************************************
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against      Mit dem tarent-Newsletter nichts mehr verpassen:
 ╳  HTML eMail! Also,     https://www.tarent.de/newsletter
╱ ╲ header encryption!
                        ****************************************************



pgsql-general by date:

Previous
From: Markus Pilman
Date:
Subject: Binding Postgres to port 0 for testing
Next
From: Erik Wienhold
Date:
Subject: Re: Binding Postgres to port 0 for testing