Skip to content

Commit cead6d8

Browse files
fix(jira_test.go): update unit test
1 parent 0807b9b commit cead6d8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

notify/jira/jira_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ func TestJiraNotify(t *testing.T) {
504504
Key: "",
505505
Fields: &issueFields{
506506
Summary: stringPtr("[FIRING:1] test (vm1 critical)"),
507-
Description: stringPtr("\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n - severity = critical\n\nAnnotations:\n\nSource: \n\n\n\n\n"),
507+
Description: "\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n - severity = critical\n\nAnnotations:\n\nSource: \n\n\n\n\n",
508508
Issuetype: &idNameValue{Name: "Incident"},
509509
Labels: []string{"ALERT{6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b}", "alertmanager", "test"},
510510
Project: &issueProject{Key: "OPS"},
@@ -553,7 +553,7 @@ func TestJiraNotify(t *testing.T) {
553553
Key: "MONITORING-1",
554554
Fields: &issueFields{
555555
Summary: stringPtr("Original Summary"),
556-
Description: stringPtr("Original Description"),
556+
Description: "Original Description",
557557
Status: &issueStatus{
558558
Name: "Open",
559559
StatusCategory: struct {
@@ -619,7 +619,7 @@ func TestJiraNotify(t *testing.T) {
619619
Key: "",
620620
Fields: &issueFields{
621621
Summary: stringPtr("[FIRING:1] test (vm1 MINOR MONITORING critical)"),
622-
Description: stringPtr("\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n - issue_type = MINOR\n - project = MONITORING\n - severity = critical\n\nAnnotations:\n\nSource: \n\n\n\n\n"),
622+
Description: "\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n - issue_type = MINOR\n - project = MONITORING\n - severity = critical\n\nAnnotations:\n\nSource: \n\n\n\n\n",
623623
Issuetype: &idNameValue{Name: "MINOR"},
624624
Labels: []string{"ALERT{6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b}", "alertmanager", "test"},
625625
Project: &issueProject{Key: "MONITORING"},
@@ -671,7 +671,7 @@ func TestJiraNotify(t *testing.T) {
671671
Key: "",
672672
Fields: &issueFields{
673673
Summary: stringPtr(strings.Repeat("A", maxSummaryLenRunes-1) + "…"),
674-
Description: stringPtr("\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n\n"),
674+
Description: "\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n\n",
675675
Issuetype: &idNameValue{Name: "Incident"},
676676
Labels: []string{"ALERT{6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b}", "alertmanager", "test"},
677677
Project: &issueProject{Key: "OPS"},
@@ -734,7 +734,7 @@ func TestJiraNotify(t *testing.T) {
734734
Key: "",
735735
Fields: &issueFields{
736736
Summary: stringPtr("[FIRING:1] test (vm1)"),
737-
Description: stringPtr("\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n\n"),
737+
Description: "\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n\n",
738738
Issuetype: &idNameValue{Name: "Incident"},
739739
Labels: []string{"ALERT{6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b}", "alertmanager", "test"},
740740
Project: &issueProject{Key: "OPS"},
@@ -789,7 +789,7 @@ func TestJiraNotify(t *testing.T) {
789789
Key: "",
790790
Fields: &issueFields{
791791
Summary: stringPtr("[RESOLVED] test (vm1)"),
792-
Description: stringPtr("\n\n\n# Alerts Resolved:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n"),
792+
Description: "\n\n\n# Alerts Resolved:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n",
793793
Issuetype: &idNameValue{Name: "Incident"},
794794
Labels: []string{"ALERT{6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b}", "alertmanager", "test"},
795795
Project: &issueProject{Key: "OPS"},
@@ -843,7 +843,7 @@ func TestJiraNotify(t *testing.T) {
843843
Key: "",
844844
Fields: &issueFields{
845845
Summary: stringPtr("[FIRING:1] test (vm1)"),
846-
Description: stringPtr("\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n\n"),
846+
Description: "\n\n# Alerts Firing:\n\nLabels:\n - alertname = test\n - instance = vm1\n\nAnnotations:\n\nSource: \n\n\n\n\n",
847847
Issuetype: &idNameValue{Name: "Incident"},
848848
Labels: []string{"ALERT{6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b}", "alertmanager", "test"},
849849
Project: &issueProject{Key: "OPS"},

0 commit comments

Comments
 (0)