Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Nov 12, 2020
1 parent 26a6f33 commit e5c6bd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/client/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func setupAdmin(t *testing.T, adminAuthToken string) (*admin.Admin, func()) {
defConfig.FFSAdminToken = adminAuthToken
}
serverDone := setupServer(t, defConfig)
conn, done := setupConnection(t, defConfig.GrpcWebProxyAddress)
conn, done := setupConnection(t, defConfig.GrpcHostAddress)
return admin.NewAdmin(adminPb.NewAdminServiceClient(conn)), func() {
done()
serverDone()
Expand Down
6 changes: 2 additions & 4 deletions api/client/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ func freePort(t *testing.T) int {
return fp
}

func setupConnection(t *testing.T, grpcHostAddress string) (*grpc.ClientConn, func()) {
func setupConnection(t *testing.T, grpcHostAddress multiaddr.Multiaddr) (*grpc.ClientConn, func()) {
auth := TokenAuth{}
ma, err := multiaddr.NewMultiaddr(grpcHostAddress)
require.NoError(t, err)
addr, err := util.TCPAddrFromMultiAddr(ma)
addr, err := util.TCPAddrFromMultiAddr(grpcHostAddress)
require.NoError(t, err)
conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithPerRPCCredentials(auth))
require.NoError(t, err)
Expand Down

0 comments on commit e5c6bd3

Please sign in to comment.