Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 18abcaa

Browse files
committed
Avoid duplicate error logs in tests
1 parent da3a1f2 commit 18abcaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

alerting_alert_rule_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestAlertRules(t *testing.T) {
1818
t.Error(err)
1919
}
2020
if alertRule.UID != "123abcd" {
21-
t.Errorf("incorrect UID - expected %s got %#v", "123abcd", alertRule.UID)
21+
t.Errorf("incorrect UID - expected %s got %s", "123abcd", alertRule.UID)
2222
}
2323
})
2424

@@ -33,13 +33,13 @@ func TestAlertRules(t *testing.T) {
3333
}
3434
t.Log(pretty.PrettyFormat(group))
3535
if group.Title != "test" {
36-
t.Errorf("incorrect title - expected %s got %#v", "test", group)
36+
t.Errorf("incorrect title - expected %s got %s", "test", group.Title)
3737
}
3838
if group.FolderUID != "d8-gk06nz" {
39-
t.Errorf("incorrect folderUID - expected %s got %#v", "d8-gk06nz", group)
39+
t.Errorf("incorrect folderUID - expected %s got %s", "d8-gk06nz", group.FolderUID)
4040
}
4141
if len(group.Rules) != 1 {
42-
t.Errorf("wrong number of rules, got %#v", group)
42+
t.Errorf("wrong number of rules, got %d", len(group.Rules))
4343
}
4444
})
4545

0 commit comments

Comments
 (0)