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
commit 56c5413dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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())
}