Always clean out the Helm deployment

Signed-off-by: Hervé Werner <dud225@hotmail.com>
This commit is contained in:
Hervé Werner 2023-01-19 16:13:04 +01:00
parent 3805e096c0
commit ad81bf5a30
4 changed files with 5 additions and 16 deletions

View file

@ -48,11 +48,6 @@ var _ = framework.IngressNginxDescribeSerial("[Admission] admission controller",
f.NewSlowEchoDeployment()
})
ginkgo.AfterEach(func() {
err := f.UninstallChart()
assert.Nil(ginkgo.GinkgoT(), err, "uninstalling helm chart")
})
ginkgo.It("reject ingress with global-rate-limit annotations when memcached is not configured", func() {
host := "admission-test"

View file

@ -40,12 +40,6 @@ var _ = framework.IngressNginxDescribeSerial("[TopologyHints] topology aware rou
f.NewEchoDeployment(framework.WithDeploymentReplicas(2), framework.WithSvcTopologyAnnotations())
})
ginkgo.AfterEach(func() {
// we need to uninstall chart because of clusterRole (controller.scope.enabled=false) which is not destroyed with namespace
err := f.UninstallChart()
assert.Nil(ginkgo.GinkgoT(), err, "uninstalling helm chart")
})
ginkgo.It("should return 200 when service has topology hints", func() {
annotations := make(map[string]string)

View file

@ -150,7 +150,11 @@ func (f *Framework) AfterEach() {
defer func(kubeClient kubernetes.Interface, ingressclass string) {
defer ginkgo.GinkgoRecover()
err := deleteIngressClass(kubeClient, ingressclass)
err := f.UninstallChart()
assert.Nil(ginkgo.GinkgoT(), err, "uninstalling helm chart")
err = deleteIngressClass(kubeClient, ingressclass)
assert.Nil(ginkgo.GinkgoT(), err, "deleting IngressClass")
}(f.KubeClientSet, f.IngressClass)

View file

@ -56,10 +56,6 @@ var _ = framework.IngressNginxDescribeSerial("[Flag] watch namespace selector",
ginkgo.AfterEach(func() {
cleanupNamespace(notMatchedNs)
cleanupNamespace(matchedNs)
// we need to uninstall chart because of clusterRole (controller.scope.enabled=false) which is not destroyed with namespace
err := f.UninstallChart()
assert.Nil(ginkgo.GinkgoT(), err, "uninstalling helm chart")
})
ginkgo.Context("With specific watch-namespace-selector flags", func() {