mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 22:40:35 +00:00
Merge pull request #136320 from pohly/e2e-framework-tcontext-namespace-fix
E2E framework: fix nil pointer crash in TContext
This commit is contained in:
@@ -187,7 +187,9 @@ func (f *Framework) TContext(ctx context.Context) ktesting.TContext {
|
||||
}
|
||||
tCtx := ktesting.InitCtx(ctx, f /* intentionally using f here and not f.TB because f overrides some methods */)
|
||||
tCtx = tCtx.WithClients(f.clientConfig, f.restMapper, f.ClientSet, f.DynamicClient, apiextensions.NewForConfigOrDie(f.clientConfig))
|
||||
tCtx = tCtx.WithNamespace(f.Namespace.Name)
|
||||
if f.Namespace != nil {
|
||||
tCtx = tCtx.WithNamespace(f.Namespace.Name)
|
||||
}
|
||||
tCtx = ensureLogger(tCtx)
|
||||
return tCtx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user