mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 11:48:15 +00:00
Init etcd and apiserver per test case in scheduler_perf integration tests
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
@@ -142,18 +141,6 @@ func (c *createAny) create(tCtx ktesting.TContext, env map[string]any) {
|
||||
}
|
||||
_, err = resourceClient.Create(tCtx, obj, options)
|
||||
}
|
||||
if err == nil && shouldCleanup(tCtx) {
|
||||
tCtx.CleanupCtx(func(tCtx ktesting.TContext) {
|
||||
del := resourceClient.Delete
|
||||
if mapping.Scope.Name() != meta.RESTScopeNameNamespace {
|
||||
del = resourceClient.Namespace(c.Namespace).Delete
|
||||
}
|
||||
err := del(tCtx, obj.GetName(), metav1.DeleteOptions{})
|
||||
if !apierrors.IsNotFound(err) {
|
||||
tCtx.ExpectNoError(err, fmt.Sprintf("deleting %s.%s %s", obj.GetKind(), obj.GetAPIVersion(), klog.KObj(obj)))
|
||||
}
|
||||
})
|
||||
}
|
||||
return err
|
||||
}
|
||||
// Retry, some errors (like CRD just created and type not ready for use yet) are temporary.
|
||||
|
||||
Reference in New Issue
Block a user