mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-23 16:19:42 -05:00
30 lines
497 B
Bash
30 lines
497 B
Bash
|
|
#!/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
|