feature: [vmalert] Add more test cases

This commit is contained in:
Jiekun 2024-09-09 23:17:49 +08:00
parent 0fbc18206f
commit adab15248d
No known key found for this signature in database
GPG key ID: 4674A8E5B0AAF6CE
2 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ groups:
}
func TestParse_Success(t *testing.T) {
_, err := Parse([]string{"testdata/rules/*good.rules", "testdata/dir/*good.*"}, notifier.ValidateTemplates, true)
_, err := Parse([]string{"testdata/rules/*multi-doc-good.rules", "testdata/dir/*good.*"}, notifier.ValidateTemplates, true)
if err != nil {
t.Fatalf("error parsing files %s", err)
}

View file

@ -23,8 +23,8 @@ groups:
for: 3m
annotations:
summary: Too high connection number for {{$labels.instance}}
description: "It is {{ $value }} connections for {{$labels.instance}}"
summary: Too high connection number for {{$labels.instance}} \n\-\-\-\n
description: "It is {{ $value }} connections for {{$labels.instance}} \n---\n"
- name: TestGroupPromMixed
interval: 2s
concurrency: 2
@ -35,5 +35,5 @@ groups:
expr: sum(vm_tcplistener_conns) by (instance) > 1
for: 3m
annotations:
summary: Too high connection number for {{$labels.instance}}
summary: \n markdown result is : ----\n # header\n body: \n text \n----\n"
description: "It is {{ $value }} connections for {{$labels.instance}}"