mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Change "/ns" to "/namespaces" in few remaining places.
This commit is contained in:
@@ -252,11 +252,11 @@ type APIRequestInfoResolver struct {
|
||||
//
|
||||
// Special verbs:
|
||||
// /proxy/{resource}/{resourceName}
|
||||
// /proxy/ns/{namespace}/{resource}/{resourceName}
|
||||
// /redirect/ns/{namespace}/{resource}/{resourceName}
|
||||
// /proxy/namespaces/{namespace}/{resource}/{resourceName}
|
||||
// /redirect/namespaces/{namespace}/{resource}/{resourceName}
|
||||
// /redirect/{resource}/{resourceName}
|
||||
// /watch/{resource}
|
||||
// /watch/ns/{namespace}/{resource}
|
||||
// /watch/namespaces/{namespace}/{resource}
|
||||
//
|
||||
// Fully qualified paths for above:
|
||||
// /api/{version}/*
|
||||
|
||||
@@ -169,7 +169,7 @@ func (c *testClient) ValidateCommon(t *testing.T, err error) {
|
||||
func buildResourcePath(namespace, resource string) string {
|
||||
if len(namespace) > 0 {
|
||||
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
||||
return path.Join("ns", namespace, resource)
|
||||
return path.Join("namespaces", namespace, resource)
|
||||
}
|
||||
}
|
||||
return resource
|
||||
|
||||
@@ -86,7 +86,7 @@ func TestNamespaceList(t *testing.T) {
|
||||
c := &testClient{
|
||||
Request: testRequest{
|
||||
Method: "GET",
|
||||
Path: "/ns",
|
||||
Path: "/namespaces",
|
||||
Body: nil,
|
||||
},
|
||||
Response: Response{StatusCode: 200, Body: namespaceList},
|
||||
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
|
||||
func makeNamespaceURL(namespace, suffix string) string {
|
||||
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
||||
return makeURL("/ns/" + namespace + suffix)
|
||||
return makeURL("/namespaces/" + namespace + suffix)
|
||||
}
|
||||
return makeURL(suffix + "?namespace=" + namespace)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user