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

Function NewSimpleTestCase

pkg/testexporter/correctness/simple.go:63–80  ·  view source on GitHub ↗

NewSimpleTestCase makes a new simpleTestCase

(name string, f func(time.Time) float64, cfg CommonTestConfig)

Source from the content-addressed store, hash-verified

61
62// NewSimpleTestCase makes a new simpleTestCase
63func NewSimpleTestCase(name string, f func(time.Time) float64, cfg CommonTestConfig) Case {
64 return &simpleTestCase{
65 GaugeFunc: prometheus.NewGaugeFunc(
66 prometheus.GaugeOpts{
67 Namespace: namespace,
68 Subsystem: subsystem,
69 Name: name,
70 Help: name,
71 },
72 func() float64 {
73 return f(time.Now())
74 },
75 ),
76 name: name,
77 expectedValueAt: f,
78 cfg: cfg,
79 }
80}
81
82func (tc *simpleTestCase) Stop() {
83}

Callers 2

mainFunction · 0.92
NewDeleteSeriesTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected