mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #108039 from MadhavJivrajani/clusterscope-test-context
resttest: Modify TestContext to have namespace in context
This commit is contained in:
commit
56c5413dc6
@ -105,9 +105,6 @@ func (t *Tester) TestNamespace() string {
|
|||||||
// TestContext returns a namespaced context that will be used when making storage calls.
|
// TestContext returns a namespaced context that will be used when making storage calls.
|
||||||
// Namespace is determined by TestNamespace()
|
// Namespace is determined by TestNamespace()
|
||||||
func (t *Tester) TestContext() context.Context {
|
func (t *Tester) TestContext() context.Context {
|
||||||
if t.clusterScope {
|
|
||||||
return genericapirequest.NewContext()
|
|
||||||
}
|
|
||||||
return genericapirequest.WithNamespace(genericapirequest.NewContext(), t.TestNamespace())
|
return genericapirequest.WithNamespace(genericapirequest.NewContext(), t.TestNamespace())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user