mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
da60a68d09
vmalert: support unit tests See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2945 --------- Signed-off-by: hagen1778 <roman@victoriametrics.com> Co-authored-by: hagen1778 <roman@victoriametrics.com>
19 lines
576 B
Go
19 lines
576 B
Go
package unittest
|
|
|
|
import (
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils"
|
|
)
|
|
|
|
// AlertTestCase holds alert_rule_test cases defined in test file
|
|
type AlertTestCase struct {
|
|
EvalTime *promutils.Duration `yaml:"eval_time"`
|
|
GroupName string `yaml:"groupname"`
|
|
Alertname string `yaml:"alertname"`
|
|
ExpAlerts []ExpAlert `yaml:"exp_alerts"`
|
|
}
|
|
|
|
// ExpAlert holds exp_alerts defined in test file
|
|
type ExpAlert struct {
|
|
ExpLabels map[string]string `yaml:"exp_labels"`
|
|
ExpAnnotations map[string]string `yaml:"exp_annotations"`
|
|
}
|