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

Function TestRequestPreservesBaseTrailingSlash

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

Source from the content-addressed store, hash-verified

118}
119
120func TestRequestPreservesBaseTrailingSlash(t *testing.T) {
121 r := &Request{baseURL: &url.URL{}, pathPrefix: "/path/"}
122 if s := r.URL().String(); s != "/path/" {
123 t.Errorf("trailing slash should be preserved: %s", s)
124 }
125}
126
127func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) {
128 r := (&Request{baseURL: &url.URL{}}).AbsPath("/foo/")

Callers

nothing calls this directly

Calls 3

URLMethod · 0.95
StringMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected