mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 15:23:29 +03:00
Remove requirement for custom RPCClient (#5405)
This change is a simplification over existing code since it is not required to have a separate RPCClient structure instead keep authRPCClient can do the same job. There is no code which directly uses netRPCClient(), keeping authRPCClient is better and simpler. This simplication also allows for removal of multiple levels of locking code per object. Observed in #5160
This commit is contained in:
committed by
kannappanr
parent
7f99cc9768
commit
e19eddd759
@@ -62,9 +62,15 @@ func TestS3PeerRPC(t *testing.T) {
|
||||
// Test S3 RPC handlers
|
||||
func (s *TestRPCS3PeerSuite) testS3PeerRPC(t *testing.T) {
|
||||
// Validate for invalid token.
|
||||
args := AuthRPCArgs{AuthToken: "garbage"}
|
||||
rclient := newRPCClient(s.testAuthConf.serverAddr, s.testAuthConf.serviceEndpoint, false)
|
||||
args := AuthRPCArgs{}
|
||||
rclient := newAuthRPCClient(s.testAuthConf)
|
||||
defer rclient.Close()
|
||||
|
||||
if err := rclient.Login(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
rclient.authToken = "garbage"
|
||||
err := rclient.Call("S3.SetBucketNotificationPeer", &args, &AuthRPCReply{})
|
||||
if err != nil {
|
||||
if err.Error() != errInvalidToken.Error() {
|
||||
|
||||
Reference in New Issue
Block a user