Stop reporting interrupted tests (#11027)

This commit is contained in:
Ricardo Katz 2024-02-27 12:50:45 -03:00 committed by GitHub
parent 0e3e32d0ae
commit 58f6285c70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,7 @@ import (
"k8s.io/ingress-nginx/test/e2e/framework/httpexpect"
"github.com/onsi/ginkgo/v2"
ginkgotypes "github.com/onsi/ginkgo/v2/types"
"github.com/stretchr/testify/assert"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
@ -178,7 +179,7 @@ func (f *Framework) AfterEach() {
assert.Nil(ginkgo.GinkgoT(), err, "deleting IngressClass")
}(f.KubeClientSet, f.IngressClass)
if !ginkgo.CurrentSpecReport().Failed() {
if !ginkgo.CurrentSpecReport().Failed() || ginkgo.CurrentSpecReport().State.Is(ginkgotypes.SpecStateInterrupted) {
return
}