Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Cleanup teardown functions
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Nov 1, 2019
1 parent 4174f73 commit d997bff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions test/e2e/10_helm_chart.bats
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function teardown() {

uninstall_flux_with_helm
uninstall_tiller
uninstall_git_srv
kubectl delete namespace "$DEMO_NAMESPACE"
# Removing the namespace also takes care of removing gitsrv.
kubectl delete namespace "$FLUX_NAMESPACE"
# Only remove the demo workloads after Flux, so that they cannot be recreated.
kubectl delete namespace "$DEMO_NAMESPACE"
}
6 changes: 3 additions & 3 deletions test/e2e/11_fluxctl_install.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function teardown() {
echo '>>> Check workload'
kubectl -n "${DEMO_NAMESPACE}" rollout status deployment/podinfo

uninstall_flux_with_fluxctl
uninstall_git_srv
kubectl delete namespace "$DEMO_NAMESPACE"
# Removing the namespace also takes care of removing Flux and gitsrv.
kubectl delete namespace "$FLUX_NAMESPACE"
# Only remove the demo workloads after Flux, so that they cannot be recreated.
kubectl delete namespace "$DEMO_NAMESPACE"
}
6 changes: 3 additions & 3 deletions test/e2e/12_sync.bats
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ function setup() {
}

function teardown() {
uninstall_flux_with_fluxctl
kill "$git_port_forward_pid"
uninstall_git_srv
kubectl delete namespace "$DEMO_NAMESPACE"
# Removing the namespace also takes care of removing Flux and gitsrv.
kubectl delete namespace "$FLUX_NAMESPACE"
# Only remove the demo workloads after Flux, so that they cannot be recreated.
kubectl delete namespace "$DEMO_NAMESPACE"
}

0 comments on commit d997bff

Please sign in to comment.