mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix grpd dial option
This commit is contained in:
parent
27af11f1e8
commit
cf28108ea4
|
@ -52,7 +52,10 @@ func NewIamApiServer(router *mux.Router, option *IamServerOption) (iamApiServer
|
||||||
option: option,
|
option: option,
|
||||||
masterClient: wdclient.NewMasterClient(option.GrpcDialOption, "", "iam", "", "", "", *pb.NewServiceDiscoveryFromMap(option.Masters)),
|
masterClient: wdclient.NewMasterClient(option.GrpcDialOption, "", "iam", "", "", "", *pb.NewServiceDiscoveryFromMap(option.Masters)),
|
||||||
}
|
}
|
||||||
s3Option := s3api.S3ApiServerOption{Filer: option.Filer}
|
s3Option := s3api.S3ApiServerOption{
|
||||||
|
Filer: option.Filer,
|
||||||
|
GrpcDialOption: option.GrpcDialOption,
|
||||||
|
}
|
||||||
iamApiServer = &IamApiServer{
|
iamApiServer = &IamApiServer{
|
||||||
s3ApiConfig: s3ApiConfigure,
|
s3ApiConfig: s3ApiConfigure,
|
||||||
iam: s3api.NewIdentityAccessManagement(&s3Option),
|
iam: s3api.NewIdentityAccessManagement(&s3Option),
|
||||||
|
|
|
@ -8,6 +8,8 @@ import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
@ -58,7 +60,9 @@ func TestIsRequestPresignedSignatureV4(t *testing.T) {
|
||||||
|
|
||||||
// Tests is requested authenticated function, tests replies for s3 errors.
|
// Tests is requested authenticated function, tests replies for s3 errors.
|
||||||
func TestIsReqAuthenticated(t *testing.T) {
|
func TestIsReqAuthenticated(t *testing.T) {
|
||||||
option := S3ApiServerOption{}
|
option := S3ApiServerOption{
|
||||||
|
GrpcDialOption: grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
|
}
|
||||||
iam := NewIdentityAccessManagement(&option)
|
iam := NewIdentityAccessManagement(&option)
|
||||||
iam.identities = []*Identity{
|
iam.identities = []*Identity{
|
||||||
{
|
{
|
||||||
|
@ -94,7 +98,9 @@ func TestIsReqAuthenticated(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCheckAdminRequestAuthType(t *testing.T) {
|
func TestCheckAdminRequestAuthType(t *testing.T) {
|
||||||
option := S3ApiServerOption{}
|
option := S3ApiServerOption{
|
||||||
|
GrpcDialOption: grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
|
}
|
||||||
iam := NewIdentityAccessManagement(&option)
|
iam := NewIdentityAccessManagement(&option)
|
||||||
iam.identities = []*Identity{
|
iam.identities = []*Identity{
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue