test: use cancelation from ktesting
The return type of ktesting.NewTestContext is now a TContext. Code which combined it WithCancel often didn't compile anymore (cannot overwrite ktesting.TContext with context.Context). This is a good thing because all of that code can be simplified to let ktesting handle the cancelation.
This commit is contained in:
@@ -59,6 +59,7 @@ type TestServerSetup struct {
|
||||
type TearDownFunc func()
|
||||
|
||||
// StartTestServer runs a kube-apiserver, optionally calling out to the setup.ModifyServerRunOptions and setup.ModifyServerConfig functions
|
||||
// TODO (pohly): convert to ktesting contexts
|
||||
func StartTestServer(ctx context.Context, t testing.TB, setup TestServerSetup) (client.Interface, *rest.Config, TearDownFunc) {
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
|
||||
|
Reference in New Issue
Block a user