All Projects → LREN-CHUV → docker-pgtap

LREN-CHUV / docker-pgtap

Licence: Apache-2.0 license
Postgres pgTap test runner in docker

Projects that are alternatives of or similar to docker-pgtap

mozilla-sprint-2018
DEPRECATED & Materials Moved: This sprint was to focus on brainstorming for the Joint Roadmap for Open Science Tools.
Stars: ✭ 24 (+100%)
Mutual labels:  infrastructure
convoy
Fast and Secure Webhooks Service.
Stars: ✭ 763 (+6258.33%)
Mutual labels:  infrastructure
gitfund
[PROJECT ON HOLD] Crowdfunding platform for open source projects
Stars: ✭ 26 (+116.67%)
Mutual labels:  infrastructure
stein
A linter for config files with a customizable rule set
Stars: ✭ 92 (+666.67%)
Mutual labels:  infrastructure
awesome-open-mlops
The Fuzzy Labs guide to the universe of open source MLOps
Stars: ✭ 304 (+2433.33%)
Mutual labels:  infrastructure
gkit
A collection of basic usability component tools dedicated to providing micro-services and single services, drawing on some excellent open source project features such as kratos, go-kit, mosn, sentinel, gopkg core components. I hope you will use and mention issue and pr more often.
Stars: ✭ 159 (+1225%)
Mutual labels:  infrastructure
community-edition
Zebrunner is a Test Automation Management Tool
Stars: ✭ 171 (+1325%)
Mutual labels:  infrastructure
terraform-aws-base-networking
Terraform module for building base networking in AWS
Stars: ✭ 15 (+25%)
Mutual labels:  infrastructure
provisionr
📦📦➡️🏛️ Provision a library of R packages
Stars: ✭ 26 (+116.67%)
Mutual labels:  infrastructure
Open-Infra-Platform
This is the official repository of the open-source Open Infra Platform software (as of April 2020).
Stars: ✭ 26 (+116.67%)
Mutual labels:  infrastructure
datagov-deploy
Main repository for the data.gov service
Stars: ✭ 156 (+1200%)
Mutual labels:  infrastructure
server-instant-start
Spin up a fully configured Ubuntu/Debian-based web server in under 10 minutes with Nginx (w/ HTTPS), PHP FPM, Postfix, OpenDKIM, MySQL/MariaDB, PostgreSQL, and more. Deploy your web application too.
Stars: ✭ 17 (+41.67%)
Mutual labels:  infrastructure
Azure-70-533-Practice-Test
(RETIRED) Azure 70-533 Certification Practice Test
Stars: ✭ 32 (+166.67%)
Mutual labels:  infrastructure
formica
Simple Tool to deploy Cloudformation Templates
Stars: ✭ 60 (+400%)
Mutual labels:  infrastructure
mongocli
MongoDB Atlas CLI and MongoDB CLI enable you to manage your MongoDB in the Cloud
Stars: ✭ 116 (+866.67%)
Mutual labels:  infrastructure
cloudpods
A cloud-native open-source unified multi-cloud and hybrid-cloud platform. 开源、云原生的多云管理及混合云融合平台
Stars: ✭ 1,469 (+12141.67%)
Mutual labels:  infrastructure
infra-reefer
Managing a stable environment in your container.
Stars: ✭ 42 (+250%)
Mutual labels:  infrastructure
cim
CIM takes the pain out of Infrastructure as Code and CloudFormation
Stars: ✭ 51 (+325%)
Mutual labels:  infrastructure
mypaas
MyPaas is an Ansible playbook for startups or small companies which want to build a modern and fully automated infrastructure.
Stars: ✭ 24 (+100%)
Mutual labels:  infrastructure
ods-provisioning-app
Provisioning app, which triggers project and component provisions (including Jira / Confluence / BitBucket and OCP resource creation)
Stars: ✭ 13 (+8.33%)
Mutual labels:  infrastructure

CHUV License DockerHub ImageVersion ImageLayers Codacy Badge CircleCI

docker-pgtap

pgTAP - Unit testing for PostgreSQL.

This is a docker image that contains pgTAP.

About pgTAP

pgTAP is a suite of database functions that make it easy to write TAP-emitting unit tests in psql scripts or xUnit-style test functions. The TAP output is suitable for harvesting, analysis, and reporting by a TAP harness.

From: pgTAP: Unit testing for PostgreSQL

Install

This docker image is available as an automated build on the docker registry hub, so using it is as simple as running:

$ docker run hbpmip/pgtap:1.0.0-3

How to use this image

Start a postgres instance

$ docker run --name db-under-test -e POSTGRES_PASSWORD=mysecretpassword -d postgres

then fill the database with tables and data, using something you want to test.

Execute the tests

$ docker run -i -t --rm --name pgtap --link db-under-test:db -e PASSWORD=postgres -v /local/folder/with/tests/:/test hbpmip/pgtap:1.0.0-3

Environment variables:

  • DATABASE
  • HOST=db
  • PORT=5432
  • USER="postgres"
  • PASSWORD=""
  • TESTS="/test/*.sql"
  • VERBOSE=0
  • INSTALL=1
  • UNINSTALL=1

Command line options:

$ docker run -i -t --rm --name pgtap hbpmip/pgtap:1.0.0-3

Options include:

  • -v: verbose
  • -h <host>: host to connect to
  • -p <port>: port to connect to
  • -d <database>: database name to connect to
  • -u <user>: user for the database connection
  • -w <password>: password for the database connection
  • -t <tests>: list of test files to execute
  • -a: assume pgTap is already installed, do not install
  • -k: keep pgTap installed after tests, do not uninstall

Installing/uninstalling pgtap into your database

This is useful mostly during test development.

$ docker run -i -t --rm --name pgtap --link db-under-test:db -e PASSWORD=postgres --entrypoint /install.sh hbpmip/pgtap:1.0.0-3
$ docker run -i -t --rm --name pgtap --link db-under-test:db -e PASSWORD=postgres -v /local/folder/with/tests/:/test hbpmip/pgtap:1.0.0-3 -a -k
# hack hack
$ docker run -i -t --rm --name pgtap --link db-under-test:db -e PASSWORD=postgres -v /local/folder/with/tests/:/test hbpmip/pgtap:1.0.0-3 -a -k
$ docker run -i -t --rm --name pgtap --link db-under-test:db -e PASSWORD=postgres --entrypoint /uninstall.sh hbpmip/pgtap:1.0.0-3

Build

Run: ./build.sh

Test

Run: ./tests/test.sh

Additional dependencies:

  • docker-compose

Publish on Docker Hub

Run: ./publish.sh

Additional dependencies:

License

Docker packaging

(this project)

Copyright (C) 2017 LREN CHUV

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Initial packaging done by Andreas Wålm [email protected]

pgTAP

pgTAP license

Copyright (c) 2008-2016 David E. Wheeler. Some rights reserved.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL DAVID E. WHEELER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF DAVID E. WHEELER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

DAVID E. WHEELER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND DAVID E. WHEELER HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Acknowledgements

This work has been funded by the European Union Seventh Framework Program (FP7/2007­2013) under grant agreement no. 604102 (HBP)

This work is part of SP8 of the Human Brain Project (SGA1).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].