From 75bae065fdf1ff9b60508e12e24d650fd559abc2 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Sat, 3 Sep 2016 21:08:33 +0200 Subject: [PATCH] Revert "Modify tests to adjust to reverting the /graph changes" This reverts commit f1ea5bf232836990d008f8912454021763c39db3. Part two necessary for reverting the /graph revert. --- rules/alerting_test.go | 11 +++-------- rules/recording_test.go | 5 +---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/rules/alerting_test.go b/rules/alerting_test.go index aee679806c..194f316f77 100644 --- a/rules/alerting_test.go +++ b/rules/alerting_test.go @@ -27,16 +27,11 @@ func TestAlertingRuleHTMLSnippet(t *testing.T) { } rule := NewAlertingRule("testrule", expr, 0, model.LabelSet{"html": "BOLD"}, model.LabelSet{"html": "BOLD"}) - // 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>"} + 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 8f597fa0a9..36b5ac1ddf 100644 --- a/rules/recording_test.go +++ b/rules/recording_test.go @@ -76,10 +76,7 @@ func TestRecordingRuleHTMLSnippet(t *testing.T) { } rule := NewRecordingRule("testrule", expr, model.LabelSet{"html": "BOLD"}) - // 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>"}` + const want = `testrule{html="<b>BOLD</b>"} = foo{html="<b>BOLD<b>"}` got := rule.HTMLSnippet("/test/prefix") if got != want {