MCPcopy Index your code
hub / github.com/prometheus/prometheus / assertAPIError

Function assertAPIError

web/api/v1/api_test.go:3889–3898  ·  view source on GitHub ↗
(t *testing.T, got *apiError, exp errorType)

Source from the content-addressed store, hash-verified

3887}
3888
3889func assertAPIError(t *testing.T, got *apiError, exp errorType) {
3890 t.Helper()
3891
3892 if exp.num == ErrorNone {
3893 require.Nil(t, got)
3894 } else {
3895 require.NotNil(t, got)
3896 require.Equal(t, exp, got.typ, "(%q)", got)
3897 }
3898}
3899
3900func assertAPIResponse(t *testing.T, got, exp any) {
3901 t.Helper()

Callers 9

TestGetSeriesFunction · 0.85
TestQueryExemplarsFunction · 0.85
TestLabelNamesFunction · 0.85
TestStatsFunction · 0.85
testEndpointsFunction · 0.85
TestAdminEndpointsFunction · 0.85
TestTSDBStatusFunction · 0.85
TestSelfMetricsFunction · 0.85
TestQueryTimeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…