mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 10:48:15 +00:00
Pass Context to StartTestServer
Signed-off-by: Kante Yin <kerthcet@gmail.com>
This commit is contained in:
@@ -291,8 +291,12 @@ func TestCustomResourceEnqueue(t *testing.T) {
|
||||
testfwk.SharedEtcd(),
|
||||
)
|
||||
testCtx := &testutils.TestContext{}
|
||||
testCtx.Ctx, testCtx.CancelFn = context.WithCancel(context.Background())
|
||||
testCtx.CloseFn = func() { server.TearDownFn() }
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
testCtx.Ctx = ctx
|
||||
testCtx.CloseFn = func() {
|
||||
cancel()
|
||||
server.TearDownFn()
|
||||
}
|
||||
|
||||
apiExtensionClient := apiextensionsclient.NewForConfigOrDie(server.ClientConfig)
|
||||
dynamicClient := dynamic.NewForConfigOrDie(server.ClientConfig)
|
||||
|
||||
Reference in New Issue
Block a user