mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Avoid pointer based copy, instead use Clone() (#8547)
This PR adds functional test to test expanded cluster syntax.
This commit is contained in:
committed by
Nitish Tiwari
parent
9565641b9b
commit
4e9de58675
@@ -515,7 +515,7 @@ func newTestConfig(bucketLocation string, obj ObjectLayer) (err error) {
|
||||
config.SetRegion(globalServerConfig, bucketLocation)
|
||||
|
||||
// Save config.
|
||||
return saveServerConfig(context.Background(), obj, globalServerConfig, nil)
|
||||
return saveServerConfig(context.Background(), obj, globalServerConfig)
|
||||
}
|
||||
|
||||
// Deleting the temporary backend and stopping the server.
|
||||
@@ -1585,20 +1585,7 @@ func newTestObjectLayer(endpointZones EndpointZones) (newObject ObjectLayer, err
|
||||
return NewFSObjectLayer(endpointZones[0].Endpoints[0].Path)
|
||||
}
|
||||
|
||||
var formats = make([]*formatXLV3, len(endpointZones))
|
||||
var deploymentID string
|
||||
for i, ep := range endpointZones {
|
||||
formats[i], err = waitForFormatXL(ep.Endpoints[0].IsLocal, ep.Endpoints,
|
||||
ep.SetCount, ep.DrivesPerSet, deploymentID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if deploymentID == "" {
|
||||
deploymentID = formats[i].ID
|
||||
}
|
||||
}
|
||||
|
||||
zones, err := newXLZones(endpointZones, formats)
|
||||
z, err := newXLZones(endpointZones)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1606,15 +1593,15 @@ func newTestObjectLayer(endpointZones EndpointZones) (newObject ObjectLayer, err
|
||||
globalConfigSys = NewConfigSys()
|
||||
|
||||
globalIAMSys = NewIAMSys()
|
||||
globalIAMSys.Init(zones)
|
||||
globalIAMSys.Init(z)
|
||||
|
||||
globalPolicySys = NewPolicySys()
|
||||
globalPolicySys.Init(nil, zones)
|
||||
globalPolicySys.Init(nil, z)
|
||||
|
||||
globalNotificationSys = NewNotificationSys(endpointZones)
|
||||
globalNotificationSys.Init(nil, zones)
|
||||
globalNotificationSys.Init(nil, z)
|
||||
|
||||
return zones, nil
|
||||
return z, nil
|
||||
}
|
||||
|
||||
// initObjectLayer - Instantiates object layer and returns it.
|
||||
|
||||
Reference in New Issue
Block a user