mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-22 13:33:09 -06:00
Run fed routing tests with both databases
This commit is contained in:
parent
298e3455d5
commit
1551539c24
|
|
@ -45,7 +45,8 @@ func (u *fakeUserAPI) QueryProfile(ctx context.Context, req *userAPI.QueryProfil
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestHandleQueryProfile(t *testing.T) {
|
func TestHandleQueryProfile(t *testing.T) {
|
||||||
base, close := testrig.CreateBaseDendrite(t, test.DBTypeSQLite)
|
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
|
||||||
|
base, close := testrig.CreateBaseDendrite(t, dbType)
|
||||||
defer close()
|
defer close()
|
||||||
|
|
||||||
fedMux := mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath()
|
fedMux := mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath()
|
||||||
|
|
@ -89,4 +90,5 @@ func TestHandleQueryProfile(t *testing.T) {
|
||||||
data, _ := io.ReadAll(res.Body)
|
data, _ := io.ReadAll(res.Body)
|
||||||
println(string(data))
|
println(string(data))
|
||||||
assert.Equal(t, 200, res.StatusCode)
|
assert.Equal(t, 200, res.StatusCode)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@ func (f *fakeFedClient) LookupRoomAlias(ctx context.Context, origin, s gomatrixs
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestHandleQueryDirectory(t *testing.T) {
|
func TestHandleQueryDirectory(t *testing.T) {
|
||||||
base, close := testrig.CreateBaseDendrite(t, test.DBTypeSQLite)
|
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
|
||||||
|
base, close := testrig.CreateBaseDendrite(t, dbType)
|
||||||
defer close()
|
defer close()
|
||||||
|
|
||||||
fedMux := mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath()
|
fedMux := mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath()
|
||||||
|
|
@ -89,4 +90,5 @@ func TestHandleQueryDirectory(t *testing.T) {
|
||||||
data, _ := io.ReadAll(res.Body)
|
data, _ := io.ReadAll(res.Body)
|
||||||
println(string(data))
|
println(string(data))
|
||||||
assert.Equal(t, 200, res.StatusCode)
|
assert.Equal(t, 200, res.StatusCode)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue