Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
tommysitu committed Mar 20, 2024
1 parent 4c1b823 commit 27bd026
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/journal/journal_index_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package journal

import (
v2 "github.com/SpectoLabs/hoverfly/core/handlers/v2"
"github.com/SpectoLabs/hoverfly/core/models"
"github.com/SpectoLabs/hoverfly/core/util"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -93,10 +94,13 @@ func TestIndex_ConvertToIndexView(t *testing.T) {
Expect(indexView).ToNot(BeNil())
Expect(indexView.Name).To(Equal("Request.QueryParam.id"))
Expect(indexView.Entries).To(HaveLen(2))
Expect(indexView.Entries[0].Key).To(Equal("a"))
Expect(indexView.Entries[0].JournalEntryId).To(Equal("1"))
Expect(indexView.Entries[1].Key).To(Equal("b"))
Expect(indexView.Entries[1].JournalEntryId).To(Equal("2"))
Expect(indexView.Entries).To(ConsistOf(v2.JournalIndexEntryView{
Key: "a",
JournalEntryId: "1",
}, v2.JournalIndexEntryView{
Key: "b",
JournalEntryId: "2",
}))
}

func TestIndex_FilteredConversionIndexView(t *testing.T) {
Expand Down

0 comments on commit 27bd026

Please sign in to comment.