(t *testing.T, err error, category errs.Category, subtype errs.Subtype)
| 63 | } |
| 64 | |
| 65 | func requireCallAPIProblem(t *testing.T, err error, category errs.Category, subtype errs.Subtype) { |
| 66 | t.Helper() |
| 67 | if err == nil { |
| 68 | t.Fatal("expected error, got nil") |
| 69 | } |
| 70 | p, ok := errs.ProblemOf(err) |
| 71 | if !ok { |
| 72 | t.Fatalf("expected typed errs error, got %T: %v", err, err) |
| 73 | } |
| 74 | if p.Category != category || p.Subtype != subtype { |
| 75 | t.Fatalf("problem = %s/%s, want %s/%s", p.Category, p.Subtype, category, subtype) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | func TestConsumeRuntimeCallAPI_NonJSONHTTPError(t *testing.T) { |
| 80 | r := newTestConsumeRuntime(stubRoundTripper{respond: stubResponse(http.StatusNotFound, "text/plain", "gone")}) |
no test coverage detected