mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
use ginkgo.DeferCleanup to do cleanup tasks
This commit is contained in:
parent
129418b9a9
commit
c9bfc3b455
@ -270,11 +270,11 @@ var _ = SIGDescribe(feature.ClusterTrustBundle, feature.ClusterTrustBundleProjec
|
|||||||
var cleanups []func(ctx context.Context)
|
var cleanups []func(ctx context.Context)
|
||||||
var projections []v1.VolumeProjection
|
var projections []v1.VolumeProjection
|
||||||
|
|
||||||
defer func() {
|
ginkgo.DeferCleanup(func(ctx context.Context) {
|
||||||
for _, c := range cleanups {
|
for _, c := range cleanups {
|
||||||
c(ctx)
|
c(ctx)
|
||||||
}
|
}
|
||||||
}()
|
})
|
||||||
for i := range numCTBs {
|
for i := range numCTBs {
|
||||||
ctb := ctbForCA(fmt.Sprintf("test.test:signer-hundreds:%d", i), "test.test/signer-hundreds", mustMakeCAPEM(fmt.Sprintf("root%d", i)), nil)
|
ctb := ctbForCA(fmt.Sprintf("test.test:signer-hundreds:%d", i), "test.test/signer-hundreds", mustMakeCAPEM(fmt.Sprintf("root%d", i)), nil)
|
||||||
initCTBs = append(initCTBs, ctb)
|
initCTBs = append(initCTBs, ctb)
|
||||||
|
Loading…
Reference in New Issue
Block a user