MCPcopy
hub / github.com/kubernetes/client-go / TestRequestSetsNamespace

Function TestRequestSetsNamespace

rest/request_test.go:146–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

144}
145
146func TestRequestSetsNamespace(t *testing.T) {
147 r := (&Request{
148 baseURL: &url.URL{
149 Path: "/",
150 },
151 }).Namespace("foo")
152 if r.namespace == "" {
153 t.Errorf("namespace should be set: %#v", r)
154 }
155
156 if s := r.URL().String(); s != "namespaces/foo" {
157 t.Errorf("namespace should be in path: %s", s)
158 }
159}
160
161func TestRequestOrdersNamespaceInPath(t *testing.T) {
162 r := (&Request{

Callers

nothing calls this directly

Calls 4

URLMethod · 0.80
NamespaceMethod · 0.65
ErrorfMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected