Skip to content

Commit c9bfc3b

Browse files
carlorystlaz
authored andcommitted
use ginkgo.DeferCleanup to do cleanup tasks
1 parent 129418b commit c9bfc3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e/auth/projected_clustertrustbundle.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@ var _ = SIGDescribe(feature.ClusterTrustBundle, feature.ClusterTrustBundleProjec
270270
var cleanups []func(ctx context.Context)
271271
var projections []v1.VolumeProjection
272272

273-
defer func() {
273+
ginkgo.DeferCleanup(func(ctx context.Context) {
274274
for _, c := range cleanups {
275275
c(ctx)
276276
}
277-
}()
277+
})
278278
for i := range numCTBs {
279279
ctb := ctbForCA(fmt.Sprintf("test.test:signer-hundreds:%d", i), "test.test/signer-hundreds", mustMakeCAPEM(fmt.Sprintf("root%d", i)), nil)
280280
initCTBs = append(initCTBs, ctb)

0 commit comments

Comments
 (0)