fix up old test exhibiting a false positive
This commit is contained in:
parent
462f9be27f
commit
dfddd63225
|
@ -33,9 +33,8 @@ func TestTunnelServerSimple(t *testing.T) {
|
|||
botA := theBots[indexA].Server
|
||||
botB := theBots[indexB].Server
|
||||
|
||||
// allow both clients
|
||||
// only allow A
|
||||
theBots[indexSrv].Members.Add(ctx, botA.Whoami(), roomdb.RoleMember)
|
||||
theBots[indexSrv].Members.Add(ctx, botB.Whoami(), roomdb.RoleMember)
|
||||
|
||||
// allow bots to dial the remote
|
||||
theBots[indexA].Members.Add(ctx, serv.Whoami(), roomdb.RoleMember)
|
||||
|
@ -51,15 +50,15 @@ func TestTunnelServerSimple(t *testing.T) {
|
|||
err = botB.Network.Connect(ctx, serv.Network.GetListenAddr())
|
||||
r.NoError(err, "connect B to the Server") // we dont see an error because it just establishes the tcp connection
|
||||
|
||||
// t.Log("letting handshaking settle..")
|
||||
// time.Sleep(1 * time.Second)
|
||||
t.Log("letting handshaking settle..")
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
var srvWho struct {
|
||||
ID refs.FeedRef
|
||||
}
|
||||
|
||||
endpointB, has := botB.Network.GetEndpointFor(serv.Whoami())
|
||||
r.False(has, "botB has an endpoint for the server!")
|
||||
r.False(has, "botB has an endpoint for the server")
|
||||
if endpointB != nil {
|
||||
a.Nil(endpointB, "should not have an endpoint on B")
|
||||
err = endpointB.Async(ctx, &srvWho, muxrpc.TypeJSON, muxrpc.Method{"whoami"})
|
||||
|
|
|
@ -94,6 +94,10 @@ func makeNamedTestBot(t testing.TB, name string, opts []roomsrv.Option) (roomdb.
|
|||
t.Log("db close failed: ", err)
|
||||
}
|
||||
})
|
||||
|
||||
err = db.Config.SetPrivacyMode(context.TODO(), roomdb.ModeRestricted)
|
||||
r.NoError(err)
|
||||
|
||||
sb := signinwithssb.NewSignalBridge()
|
||||
theBot, err := roomsrv.New(db.Members, db.DeniedKeys, db.Aliases, db.AuthWithSSB, sb, db.Config, name, botOptions...)
|
||||
r.NoError(err)
|
||||
|
|
Loading…
Reference in New Issue