(gv *schema.GroupVersion, h func(http.ResponseWriter, *http.Request))
| 59 | } |
| 60 | |
| 61 | func getClientServer(gv *schema.GroupVersion, h func(http.ResponseWriter, *http.Request)) (Interface, *httptest.Server, error) { |
| 62 | srv := httptest.NewServer(http.HandlerFunc(h)) |
| 63 | cl, err := NewClient(&restclient.Config{ |
| 64 | Host: srv.URL, |
| 65 | ContentConfig: restclient.ContentConfig{GroupVersion: gv}, |
| 66 | }, *gv) |
| 67 | if err != nil { |
| 68 | srv.Close() |
| 69 | return nil, nil, err |
| 70 | } |
| 71 | return cl, srv, nil |
| 72 | } |
| 73 | |
| 74 | func TestList(t *testing.T) { |
| 75 | tcs := []struct { |
no test coverage detected