mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01:00
5aa7846900
* vmalert: support rules backfilling (aka `replay`) vmalert can `replay` configured rules in the past and backfill results via remote write protocol. It supports MetricsQL/PromQL storage as data source, and can backfill data to remote write compatible storage. Supports recording and alerting rules `replay`. See more details in README. https://github.com/VictoriaMetrics/VictoriaMetrics/issues/836 * vmalert: review fixes * vmalert: readme fixes
19 lines
360 B
Go
19 lines
360 B
Go
package datasource
|
|
|
|
import "testing"
|
|
|
|
func TestMetric_Label(t *testing.T) {
|
|
m := &Metric{}
|
|
|
|
m.AddLabel("foo", "bar")
|
|
checkEqualString(t, "bar", m.Label("foo"))
|
|
|
|
m.SetLabel("foo", "baz")
|
|
checkEqualString(t, "baz", m.Label("foo"))
|
|
|
|
m.SetLabel("qux", "quux")
|
|
checkEqualString(t, "quux", m.Label("qux"))
|
|
|
|
checkEqualString(t, "", m.Label("non-existing"))
|
|
}
|