terraform-provider-docker/scripts/testacc_full.sh
Manuel Vogel 62ddaf9e23
Refactors test setup (#156)
* refactors test setup according to the postgres provider
* updates readme for new test setup
2019-06-01 12:01:42 +02:00

29 lines
497 B
Bash
Executable file

#!/bin/bash
set -e
log() {
echo "####################"
echo "## -> $1 "
echo "####################"
}
setup() {
sh "$(pwd)"/scripts/testacc_setup.sh
}
run() {
go clean -testcache
TF_ACC=1 go test ./docker -v -timeout 120m
# keep the return value for the scripts to fail and clean properly
return $?
}
cleanup() {
sh "$(pwd)"/scripts/testacc_cleanup.sh
}
## main
log "setup" && setup
log "run" && run || (log "cleanup" && cleanup && exit 1)
log "cleanup" && cleanup