Merge pull request #108039 from MadhavJivrajani/clusterscope-test-context

resttest: Modify TestContext to have namespace in context
This commit is contained in:
Kubernetes Prow Robot
2022-02-10 08:21:58 -08:00
committed by GitHub

View File

@@ -105,9 +105,6 @@ func (t *Tester) TestNamespace() string {
// TestContext returns a namespaced context that will be used when making storage calls.
// Namespace is determined by TestNamespace()
func (t *Tester) TestContext() context.Context {
if t.clusterScope {
return genericapirequest.NewContext()
}
return genericapirequest.WithNamespace(genericapirequest.NewContext(), t.TestNamespace())
}