1.5 KiB
1.5 KiB
Integration testing
Preperation
- Create valid ACME file
/tmp/acme.json - Start backends using docker
docker run -d -p 8500:8500 --name consul consul docker run -d -p 2181:2181 --name zookeeper zookeeper docker run -d -p 2379:2379 --name etcd quay.io/coreos/etcd:v3.3.12 etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2380 - Build tests
export GO111MODULE=on go build - Initialize backends
./tests - Run certs dumper without watching
../traefik-certs-dumper dump --source.file=/tmp/acme.json ../traefik-certs-dumper dump --source consul --source.kv.endpoints=localhost:8500 ../traefik-certs-dumper dump --source etcd --source.kv.endpoints=localhost:2379 ../traefik-certs-dumper dump --source boltdb --source.kv.endpoints=/tmp/my.db ../traefik-certs-dumper dump --source zookeeper --source.kv.endpoints=localhost:2181 - Run certs dumper with watching
While watching is enabled, run../traefik-certs-dumper dump --watch --source.file=/tmp/acme.json ../traefik-certs-dumper dump --watch --source consul --source.kv.endpoints=localhost:8500 ../traefik-certs-dumper dump --watch --source etcd --source.kv.endpoints=localhost:2379 ../traefik-certs-dumper dump --watch --source zookeeper --source.kv.endpoints=localhost:2181./testsagain for KV backends or manipulate/tmp/acme.jsonfor file backend that change events are triggered.