-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker test environment for easy development.
Add a Dockerfile with a Postgres build environment as well as simple scripting to make it easy for contributors to quickly iterate on extension development without needing to configure a build environment. Unfortunately I can't easily add the Docker setup to the Makefile (as it's normally common to do) since the existing Makefile requires the full Postgres extension build environment, which would defeat a lot of the purpose of the Docker environment in the first place.
- Loading branch information
jcoleman
committed
Jan 3, 2020
1 parent
03cfb3a
commit 4d7c031
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM postgres:12 | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install \ | ||
build-essential \ | ||
postgresql-server-dev-all \ | ||
postgresql-server-dev-12 | ||
|
||
RUN apt-get update && apt-get -y install postgresql-12-pgtap | ||
|
||
COPY build_for_tests.sh / | ||
|
||
RUN echo "max_locks_per_transaction = 128" >> /postgresql.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! /bin/bash | ||
|
||
cd /home/pg_partman | ||
|
||
make && make install | ||
|
||
psql -U postgres -c "DROP DATABASE IF EXISTS partman_test" | ||
psql -U postgres -c "CREATE DATABASE partman_test" | ||
psql -U postgres -d partman_test -c "CREATE EXTENSION pgtap" | ||
psql -U postgres -d partman_test -c "CREATE SCHEMA partman" | ||
psql -U postgres -d partman_test -c "CREATE EXTENSION pg_partman SCHEMA partman" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters