8000 GitHub - nmerigaud/docker-pgtap: Docker image with Postgres and pgtap installed
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nmerigaud/docker-pgtap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker image with Postgres, pgtap, and plv8 installed.

Usage

Fire up a database via docker:

docker run --rm --name pg-docker -e POSTGRES_PASSWORD=p0stgr3s -d -p 5432:5432 -v $HOME/.docker/volumes/postgres:/var/lib/postgresql/data sarumont/postgres-pgtap:latest

This can be connected to via localhost:5432:

psql -h localhost -U postgres postgres

You can now apply your schema, etc.

Running tests

To run pgtap tests,

docker run -i -t --rm --name pgtap --link pg-docker:db -ePGPASSWORD=p0stgr3s -v <local path to tests>:/test sarumont/postgres-pgtap:latest pg_prove -Upostgres -h db -d <database name> -v /test/<test file>

Validating plv8 installation

To validate, and use plv8:

# CREATE EXTENSION plv8;
CREATE EXTENSION

# select plv8_version();
 plv8_version 
--------------
 2.3.15
(1 row)

About

Docker image with Postgres and pgtap installed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%
2ACE
0