MCPcopy Create free account
hub / github.com/cortexproject/cortex / Test

Method Test

pkg/testexporter/correctness/simple.go:140–149  ·  view source on GitHub ↗
(ctx context.Context, client v1.API, selectors string, start time.Time, duration time.Duration)

Source from the content-addressed store, hash-verified

138}
139
140func (tc *simpleTestCase) Test(ctx context.Context, client v1.API, selectors string, start time.Time, duration time.Duration) (bool, error) {
141 log := spanlogger.FromContext(ctx)
142 pairs, err := tc.Query(ctx, client, selectors, start, duration)
143 if err != nil {
144 level.Info(log).Log("err", err)
145 return false, err
146 }
147
148 return verifySamples(spanlogger.FromContext(ctx), tc, pairs, duration, tc.cfg), nil
149}
150
151func (tc *simpleTestCase) MinQueryTime() time.Time {
152 return calculateMinQueryTime(tc.cfg.durationQuerySince, tc.cfg.timeQueryStart)

Callers

nothing calls this directly

Calls 4

QueryMethod · 0.95
FromContextFunction · 0.92
verifySamplesFunction · 0.85
LogMethod · 0.45

Tested by

no test coverage detected