(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestDoRequestSuccess(t *testing.T) { |
| 73 | testServer, fakeHandler, status := testServerEnv(t, 200) |
| 74 | defer testServer.Close() |
| 75 | |
| 76 | c, err := restClient(testServer) |
| 77 | if err != nil { |
| 78 | t.Fatalf("unexpected error: %v", err) |
| 79 | } |
| 80 | body, err := c.Get().Prefix("test").Do().Raw() |
| 81 | |
| 82 | testParam := TestParam{actualError: err, expectingError: false, expCreated: true, |
| 83 | expStatus: status, testBody: true, testBodyErrorIsNotNil: false} |
| 84 | validate(testParam, t, body, fakeHandler) |
| 85 | } |
| 86 | |
| 87 | func TestDoRequestFailed(t *testing.T) { |
| 88 | status := &metav1.Status{ |
nothing calls this directly
no test coverage detected