Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rochacon/temaki

Disposable test environments for 12factor applications using Docker.
https://github.com/rochacon/temaki

Last synced: about 1 month ago
JSON representation

Disposable test environments for 12factor applications using Docker.

Awesome Lists containing this project

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/...
```