Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rochacon/temaki
Disposable test environments for 12factor applications using Docker.
https://github.com/rochacon/temaki
Last synced: 23 days ago
JSON representation
Disposable test environments for 12factor applications using Docker.
- Host: GitHub
- URL: https://github.com/rochacon/temaki
- Owner: rochacon
- License: mit
- Created: 2015-01-29T00:28:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-25T08:19:48.000Z (over 7 years ago)
- Last Synced: 2024-08-04T04:03:17.581Z (4 months ago)
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 10
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - temaki - Disposable test environments for 12factor applications using Docker. (Go)
README
# temaki
Disposable test environment for 12 factor applications.
`temaki` depends on Docker.
:warning: `temaki` is still in early development and may/will change.
## Install
Just `go get` it:
```
go get github.com/rochacon/temaki
```## Using it
### Create a `temaki.yml` file at your project root folder
Here is a example of the config file
```yaml
-- The command that run your test suite
cmd: go test ./...
-- Dockerfile location
dockerfile: ./Dockerfile
-- Name of the Docker image
image: my-app
-- Dependant services (databases, cache, queues, etc.)
-- Hooks are supported to facilitate test setup
services:
-- those are the environment variables that Temaki will set for you test suite
DATABASE_URL:
format: postgres://postgres:postgres@{{ .Host }}:{{ .Port }}/test?sslmode=disable
image: postgres:9.4
port: 5432
hooks:
pre-run:
- psql "CREATE DATABASE test CHARSET utf8;"
post-run:
- psql "DROP DATABASE test;"
BROKER_URL:
format: amqp://guest@{{ .Host }}:{{ .Port }}/test
image: rabbitmq
```Now run `temaki` to run your test suite against disposable services.
You may also specify the test suite command at runtime, like:
```
temaki go test -cover -v ./handlers/...
```