mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Missed bits
This commit is contained in:
parent
9cb5528c31
commit
3ffb1618c0
|
|
@ -18,6 +18,7 @@ import (
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/appservice"
|
"github.com/matrix-org/dendrite/appservice"
|
||||||
"github.com/matrix-org/dendrite/appservice/api"
|
"github.com/matrix-org/dendrite/appservice/api"
|
||||||
|
"github.com/matrix-org/dendrite/appservice/consumers"
|
||||||
"github.com/matrix-org/dendrite/internal/caching"
|
"github.com/matrix-org/dendrite/internal/caching"
|
||||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||||
"github.com/matrix-org/dendrite/roomserver"
|
"github.com/matrix-org/dendrite/roomserver"
|
||||||
|
|
@ -338,7 +339,7 @@ func TestRoomserverConsumerOneInvite(t *testing.T) {
|
||||||
evChan := make(chan struct{})
|
evChan := make(chan struct{})
|
||||||
// create a dummy AS url, handling the events
|
// create a dummy AS url, handling the events
|
||||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
var txn gomatrixserverlib.ApplicationServiceTransaction
|
var txn consumers.ApplicationServiceTransaction
|
||||||
err := json.NewDecoder(r.Body).Decode(&txn)
|
err := json.NewDecoder(r.Body).Decode(&txn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import (
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/syncapi/routing"
|
"github.com/matrix-org/dendrite/syncapi/routing"
|
||||||
"github.com/matrix-org/dendrite/syncapi/storage"
|
"github.com/matrix-org/dendrite/syncapi/storage"
|
||||||
|
"github.com/matrix-org/dendrite/syncapi/synctypes"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/producers"
|
"github.com/matrix-org/dendrite/clientapi/producers"
|
||||||
"github.com/matrix-org/dendrite/roomserver"
|
"github.com/matrix-org/dendrite/roomserver"
|
||||||
|
|
@ -473,7 +474,7 @@ func testHistoryVisibility(t *testing.T, dbType test.DBType) {
|
||||||
}
|
}
|
||||||
// We only care about the returned events at this point
|
// We only care about the returned events at this point
|
||||||
var res struct {
|
var res struct {
|
||||||
Chunk []gomatrixserverlib.ClientEvent `json:"chunk"`
|
Chunk []synctypes.ClientEvent `json:"chunk"`
|
||||||
}
|
}
|
||||||
if err := json.NewDecoder(w.Body).Decode(&res); err != nil {
|
if err := json.NewDecoder(w.Body).Decode(&res); err != nil {
|
||||||
t.Errorf("failed to decode response body: %s", err)
|
t.Errorf("failed to decode response body: %s", err)
|
||||||
|
|
@ -521,7 +522,7 @@ func testHistoryVisibility(t *testing.T, dbType test.DBType) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func verifyEventVisible(t *testing.T, wantVisible bool, wantVisibleEvent *gomatrixserverlib.HeaderedEvent, chunk []gomatrixserverlib.ClientEvent) {
|
func verifyEventVisible(t *testing.T, wantVisible bool, wantVisibleEvent *gomatrixserverlib.HeaderedEvent, chunk []synctypes.ClientEvent) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
if wantVisible {
|
if wantVisible {
|
||||||
for _, ev := range chunk {
|
for _, ev := range chunk {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue