Run fed routing tests with both databases

This commit is contained in:
Devon Hudson 2023-01-23 09:36:01 -07:00
parent 298e3455d5
commit 1551539c24
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628
2 changed files with 86 additions and 82 deletions

View file

@ -45,7 +45,8 @@ func (u *fakeUserAPI) QueryProfile(ctx context.Context, req *userAPI.QueryProfil
}
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()
fedMux := mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath()
@ -89,4 +90,5 @@ func TestHandleQueryProfile(t *testing.T) {
data, _ := io.ReadAll(res.Body)
println(string(data))
assert.Equal(t, 200, res.StatusCode)
})
}

View file

@ -45,7 +45,8 @@ func (f *fakeFedClient) LookupRoomAlias(ctx context.Context, origin, s gomatrixs
}
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()
fedMux := mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath()
@ -89,4 +90,5 @@ func TestHandleQueryDirectory(t *testing.T) {
data, _ := io.ReadAll(res.Body)
println(string(data))
assert.Equal(t, 200, res.StatusCode)
})
}