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

Function TestRequestOrdersSubResource

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

Source from the content-addressed store, hash-verified

169}
170
171func TestRequestOrdersSubResource(t *testing.T) {
172 r := (&Request{
173 baseURL: &url.URL{},
174 pathPrefix: "/test/",
175 }).Name("bar").Resource("baz").Namespace("foo").Suffix("test").SubResource("a", "b")
176 if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar/a/b/test" {
177 t.Errorf("namespace should be in order in path: %s", s)
178 }
179}
180
181func TestRequestSetTwiceError(t *testing.T) {
182 if (&Request{}).Name("bar").Name("baz").err == nil {

Callers

nothing calls this directly

Calls 8

SubResourceMethod · 0.80
SuffixMethod · 0.80
URLMethod · 0.80
NamespaceMethod · 0.65
ResourceMethod · 0.65
StringMethod · 0.65
ErrorfMethod · 0.65
NameMethod · 0.45

Tested by

no test coverage detected