fix muxrpc tests

This commit is contained in:
Henry 2021-04-19 14:57:42 +02:00
parent 52ec94e878
commit e1db5d5162
2 changed files with 4 additions and 7 deletions

View File

@ -10,8 +10,6 @@ import (
"testing"
"time"
"github.com/ssb-ngi-pointer/go-ssb-room/web/router"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.cryptoscope.co/muxrpc/v2"
@ -107,11 +105,8 @@ func TestAliasRegister(t *testing.T) {
resolveURL, err := url.Parse(registerResponse)
r.NoError(err)
t.Log("got URL:", resolveURL)
a.Equal("srv", resolveURL.Host)
wantURL, err := router.CompleteApp().Get(router.CompleteAliasResolve).URL("alias", "bob")
r.NoError(err)
a.Equal(wantURL.Path, resolveURL.Path)
a.Equal("bob.srv", resolveURL.Host)
a.Equal("", resolveURL.Path)
// server should have the alias now
alias, err := serv.Aliases.Resolve(ctx, "bob")

View File

@ -101,6 +101,8 @@ func makeNamedTestBot(t testing.TB, name string, opts []roomsrv.Option) (roomdb.
Domain: name,
ListenAddressMUXRPC: ":0",
UseSubdomainForAliases: true,
}
sb := signinwithssb.NewSignalBridge()