Skip to content

Commit c7026c5

Browse files
committed
fix: r
Signed-off-by: ashing <[email protected]>
1 parent df3027a commit c7026c5

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/e2e/scaffold/scaffold.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,6 @@ func (s *Scaffold) afterEach() {
465465
defer GinkgoRecover()
466466
s.DeleteGatewayGroup(s.gatewaygroupid)
467467

468-
// Clean up all additional gateway groups
469-
for gatewayGroupID := range s.additionalGatewayGroups {
470-
s.DeleteGatewayGroup(gatewayGroupID)
471-
}
472-
473468
if CurrentSpecReport().Failed() {
474469
if os.Getenv("TEST_ENV") == "CI" {
475470
_, _ = fmt.Fprintln(GinkgoWriter, "Dumping namespace contents")
@@ -485,13 +480,8 @@ func (s *Scaffold) afterEach() {
485480

486481
// Delete all additional namespaces
487482
for _, resources := range s.additionalGatewayGroups {
488-
err := k8s.DeleteNamespaceE(s.t, &k8s.KubectlOptions{
489-
ConfigPath: s.opts.Kubeconfig,
490-
Namespace: resources.Namespace,
491-
}, resources.Namespace)
492-
if err != nil {
493-
s.Logf("failed to delete additional namespace %s: %v", resources.Namespace, err)
494-
}
483+
err := s.CleanupAdditionalGatewayGroup(resources.GatewayGroupID)
484+
Expect(err).NotTo(HaveOccurred(), "cleaning up additional gateway group")
495485
}
496486

497487
// if the test case is successful, just delete namespace

0 commit comments

Comments
 (0)