diff --git a/rules/alerting_test.go b/rules/alerting_test.go index 194f316f7..aee679806 100644 --- a/rules/alerting_test.go +++ b/rules/alerting_test.go @@ -27,11 +27,16 @@ func TestAlertingRuleHTMLSnippet(t *testing.T) { } rule := NewAlertingRule("testrule", expr, 0, model.LabelSet{"html": "BOLD"}, model.LabelSet{"html": "BOLD"}) - const want = `ALERT testrule - IF foo{html="<b>BOLD<b>"} + // This is valid once the /graph changes have been reintroduced: + // const want = `ALERT testrule + // IF foo{html="<b>BOLD<b>"} + // LABELS {html="<b>BOLD</b>"} + // ANNOTATIONS {html="<b>BOLD</b>"}` + // This is valid once the /graph changes have been reintroduced: + const want = `ALERT testrule + IF foo{html="<b>BOLD<b>"} LABELS {html="<b>BOLD</b>"} ANNOTATIONS {html="<b>BOLD</b>"}` - got := rule.HTMLSnippet("/test/prefix") if got != want { t.Fatalf("incorrect HTML snippet; want:\n\n|%v|\n\ngot:\n\n|%v|", want, got) diff --git a/rules/recording_test.go b/rules/recording_test.go index 36b5ac1dd..8f597fa0a 100644 --- a/rules/recording_test.go +++ b/rules/recording_test.go @@ -76,7 +76,10 @@ func TestRecordingRuleHTMLSnippet(t *testing.T) { } rule := NewRecordingRule("testrule", expr, model.LabelSet{"html": "BOLD"}) - const want = `testrule{html="<b>BOLD</b>"} = foo{html="<b>BOLD<b>"}` + // This is valid once the /graph changes have been reintroduced: + // const want = `testrule{html="<b>BOLD</b>"} = foo{html="<b>BOLD<b>"}` + // This is what we need for now: + const want = `testrule{html="<b>BOLD</b>"} = foo{html="<b>BOLD<b>"}` got := rule.HTMLSnippet("/test/prefix") if got != want {