Skip to main content

Plugin to run Postgres using the Hitch testing framework.

Project description

HitchPostgres

HitchPostgres is a plugin for the Hitch test framework that lets you run and interact with Postgres in an isolated way as part of a test.

Before starting the service, it runs the initdb command to create all required data files for a postgresql database in the .hitch directory. This means that whatever you do, you will not interfere with the system postgres files. The system postgres does not even have to be running.

After starting the service, it creates any users and databases specified that may be required for your app to start.

During the test it provides convenience functions psql, pg_dump and pg_restore so that you can interact with the database using IPython or in your test.

Use

See: https://hitchtest.readthedocs.org/en/latest/api/postgres.html

Features

  • Creates data files from scratch using initdb in the .hitch directory. Complete isolation of data from system postgres.

  • Starts up on a separate thread in parallel with other services when running with HitchServe, so that your integration tests run faster.

  • Run the server on whatever port you like.

  • Version set explicitly to prevent “works on my machine” screw ups caused by running different versions of Postgres.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hitchpostgres-0.7.0.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file hitchpostgres-0.7.0.tar.gz.

File metadata

  • Download URL: hitchpostgres-0.7.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hitchpostgres-0.7.0.tar.gz
Algorithm Hash digest
SHA256 5bfaf29a42a5fbfe5f2b6dbda5a21e60a9ded53abb61162d058fa3a582453780
MD5 0edc2fe514a30a81b1982d871be34d19
BLAKE2b-256 cd4cdd73cf82bc03a5ba7904e958539819e850771e322b7322aaf2b416788479

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page