terraform-provider-docker/scripts/testacc_full.sh
Manuel Vogel ad3e56da2b
feat: migrate to terraform-sdk v2 (#102)
* chore: runs v2 upgrade cmd
* chore: moves all files into the internal provider dir
* feat: migrates main and provider
* fix: migrates tests to provider factories
* fix: replace import state passthrough ctx func
* chore: bump tf-sdk to v2.4.4
* fix: acc test by adding stop grace period
* fix: move to validate diag functions
* test: switch from ctx TODO to Background
* feat: add state upgrade for restart_policy and auth

Co-authored-by: Shunsuke Suzuki <suzuki-shunsuke@users.noreply.github.com>
2021-03-18 08:30:54 +01:00

29 lines
508 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 ./internal/provider -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