Fix unit tests

This commit is contained in:
Neil Alexander 2020-02-20 13:04:32 +00:00
parent 136cb043a5
commit b5900e8d3a
2 changed files with 4 additions and 2 deletions

View file

@ -19,6 +19,7 @@ package v1
import ( import (
"testing" "testing"
"github.com/matrix-org/dendrite/roomserver/state/shared"
"github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/dendrite/roomserver/types"
) )
@ -45,7 +46,7 @@ func TestFindDuplicateStateKeys(t *testing.T) {
}} }}
for _, test := range testCases { for _, test := range testCases {
got := findDuplicateStateKeys(test.Input) got := shared.FindDuplicateStateKeys(test.Input)
if len(got) != len(test.Want) { if len(got) != len(test.Want) {
t.Fatalf("Wanted %v, got %v", test.Want, got) t.Fatalf("Wanted %v, got %v", test.Want, got)
} }

View file

@ -19,6 +19,7 @@ package v2
import ( import (
"testing" "testing"
"github.com/matrix-org/dendrite/roomserver/state/shared"
"github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/dendrite/roomserver/types"
) )
@ -45,7 +46,7 @@ func TestFindDuplicateStateKeys(t *testing.T) {
}} }}
for _, test := range testCases { for _, test := range testCases {
got := findDuplicateStateKeys(test.Input) got := shared.FindDuplicateStateKeys(test.Input)
if len(got) != len(test.Want) { if len(got) != len(test.Want) {
t.Fatalf("Wanted %v, got %v", test.Want, got) t.Fatalf("Wanted %v, got %v", test.Want, got)
} }