tests/smoke: Be sure terraform destroy runs

This commit is contained in:
Dalton Hubble
2017-05-19 18:08:50 -07:00
parent c476cf8928
commit 1736af5024
2 changed files with 9 additions and 3 deletions

View File

@@ -71,8 +71,11 @@ cleanup() {
if [[ -z "$TERRAFORM_PID" ]]; then
kill $TERRAFORM_PID
fi
rm -rf examples/terraform/bootkube-install/assets
rm -f examples/terraform/bootkube-install/*.tfstate*
pushd examples/terraform/bootkube-install
echo "yes" | terraform destroy || true
rm -f *.tfstate*
rm -rf assets
popd
}
main $@

View File

@@ -39,7 +39,10 @@ cleanup() {
./scripts/libvirt destroy || true
./scripts/devnet destroy || true
rkt gc --grace-period=0
rm -f examples/terraform/etcd3-install/*.tfstate*
pushd examples/terraform/etcd3-install
echo "yes" | terraform destroy || true
rm -f *.tfstate*
popd
}
main $@