mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Fix unit tests
This commit is contained in:
parent
136cb043a5
commit
b5900e8d3a
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue