tests/smoke: Ensure etcd3-terraform tests cleans state
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-source "${DIR}/common"
main() {
cleanup
@@ -36,4 +35,11 @@ etcd() {
curl --silent --fail -m 1 http://$1:2379/health > /dev/null
}
+cleanup() {
+ ./scripts/libvirt destroy || true
+ ./scripts/devnet destroy || true
+ rkt gc --grace-period=0
+ rm -f examples/terraform/etcd3-install/*.tfstate*
+}
+
main $@
