MCPcopy Index your code
hub / github.com/helm/helm / fakeClientWith

Function fakeClientWith

pkg/action/validate_test.go:108–122  ·  view source on GitHub ↗
(code int, gv schema.GroupVersion, body string)

Source from the content-addressed store, hash-verified

106}
107
108func fakeClientWith(code int, gv schema.GroupVersion, body string) *fake.RESTClient {
109 return &fake.RESTClient{
110 GroupVersion: gv,
111 NegotiatedSerializer: scheme.Codecs.WithoutConversion(),
112 Client: fake.CreateHTTPClient(func(_ *http.Request) (*http.Response, error) {
113 header := http.Header{}
114 header.Set("Content-Type", runtime.ContentTypeJSON)
115 return &http.Response{
116 StatusCode: code,
117 Header: header,
118 Body: stringBody(body),
119 }, nil
120 }),
121 }
122}
123
124func TestRequireAdoption(t *testing.T) {
125 var (

Callers 2

newMissingDeploymentFunction · 0.85
newDeploymentWithOwnerFunction · 0.85

Calls 2

stringBodyFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…