diff --git a/notifier/notifier_test.go b/notifier/notifier_test.go index 95c642b363..5c39afcd2b 100644 --- a/notifier/notifier_test.go +++ b/notifier/notifier_test.go @@ -27,6 +27,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/prometheus/alertmanager/api/v2/models" config_util "github.com/prometheus/common/config" "github.com/prometheus/common/model" yaml "gopkg.in/yaml.v2" @@ -556,3 +557,7 @@ func makeInputTargetGroup() *targetgroup.Group { Source: "testsource", } } + +func TestLabelsToOpenAPILabelSet(t *testing.T) { + testutil.Equals(t, models.LabelSet{"aaa": "111", "bbb": "222"}, labelsToOpenAPILabelSet(labels.Labels{{Name: "aaa", Value: "111"}, {Name: "bbb", Value: "222"}})) +}