MCPcopy
hub / github.com/larksuite/cli / TestConsumeRuntimeCallAPI_UnparsableJSONBody

Function TestConsumeRuntimeCallAPI_UnparsableJSONBody

cmd/event/runtime_test.go:102–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

100}
101
102func TestConsumeRuntimeCallAPI_UnparsableJSONBody(t *testing.T) {
103 r := newTestConsumeRuntime(stubRoundTripper{respond: stubResponse(http.StatusOK, "application/json", "{not json")})
104 _, err := r.CallAPI(context.Background(), "GET", "/open-apis/event/v1/connection", nil)
105 requireCallAPIProblem(t, err, errs.CategoryInternal, errs.SubtypeInvalidResponse)
106}
107
108func TestConsumeRuntimeCallAPI_TransportFailure(t *testing.T) {
109 r := newTestConsumeRuntime(stubRoundTripper{respond: func(*http.Request) (*http.Response, error) {

Callers

nothing calls this directly

Calls 4

newTestConsumeRuntimeFunction · 0.85
requireCallAPIProblemFunction · 0.85
stubResponseFunction · 0.70
CallAPIMethod · 0.65

Tested by

no test coverage detected