Skip to content

Commit 380135b

Browse files
committed
chore: remove commented out test for incident ID
1 parent ca919a1 commit 380135b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

tests/incident_summary_test.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package tests
33
import (
44
"database/sql/driver"
55
"fmt"
6-
"log"
76
"time"
87

98
"github.com/flanksource/duty/models"
@@ -72,11 +71,6 @@ var _ = ginkgo.Describe("Check incident_summary view", ginkgo.Ordered, func() {
7271
err := DefaultContext.DB().Raw("SELECT * FROM incident_summary").Scan(&incidents).Error
7372
Expect(err).ToNot(HaveOccurred())
7473

75-
for _, incident := range incidents {
76-
log.Printf("incident: id:%s title:%s severity:%s\n", incident.IncidentID, incident.Title, incident.Severity)
77-
}
78-
Expect(incidents).To(HaveLen(2))
79-
8074
Expect(len(incidents)).To(Equal(len(dummy.AllDummyIncidents)))
8175

8276
for _, incidentSummary := range incidents {
@@ -112,20 +106,14 @@ var _ = ginkgo.Describe("Check incident_summary view", ginkgo.Ordered, func() {
112106
}
113107

114108
Expect(incidentSummary.ID).To(Equal(incident.ID))
109+
Expect(incidentSummary.IncidentID).To(BeElementOf([]string{"INC-1", "INC-2"}))
115110
Expect(incidentSummary.Title).To(Equal(incident.Title))
116111
Expect(incidentSummary.Severity).To(Equal(incident.Severity))
117112
Expect(incidentSummary.Type).To(Equal(incident.Type))
118113
Expect(incidentSummary.Status).To(Equal(incident.Status))
119114
Expect(incidentSummary.Commander).To(Equal(commander))
120115
Expect(incidentSummary.Responders).To(ConsistOf(responders))
121116
Expect(incidentSummary.Commenters).To(ConsistOf(commenters))
122-
123-
// FIXME: Fails on CI.
124-
// [FAILED] Expected
125-
// <string>: INC-4
126-
// to be an element of
127-
// <[]string | len:2, cap:2>: ["INC-1", "INC-2"]
128-
// Expect(incidentSummary.IncidentID).To(BeElementOf([]string{"INC-1", "INC-2"}))
129117
}
130118
})
131119
})

0 commit comments

Comments
 (0)