This project is a simple Go application that is using a Postgres database for integration tests. The project contains tests and also an SQL file to preload the DB with test data
You need to have docker
, golang
and postgres-client
installed on your workstation first.
$ docker run -p 5432:5432 postgres:11.5
Then open another terminal and load the test data after verifying that the database is up:
$ pg_isready -h localhost -U postgres
$ psql -h localhost -U postgres < testdata/preload.sql
A Postgres instance is now running at localhost:5432 and you can run the tests with:
$ go test -v
- Create a free Codefresh account
- Fork this project in your Github account
- Create a new pipeline with codefresh.yml
More information at the documentation page.
Enjoy!