mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Honor envs properly for access and secret key. (#3703)
Also changes the behavior of `secretKeyHash` which is not necessary to be sent over the network, each node has its own secretKeyHash to validate. Fixes #3696 Partial(fix) #3700 (More changes needed with some code cleanup)
This commit is contained in:
@@ -452,8 +452,14 @@ func TestIsDistributedSetup(t *testing.T) {
|
||||
globalMinioHost = ""
|
||||
}
|
||||
|
||||
func TestInitServerConfig(t *testing.T) {
|
||||
ctx := &cli.Context{}
|
||||
// Tests init server.
|
||||
func TestInitServer(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
app.Commands = []cli.Command{serverCmd}
|
||||
serverFlagSet := flag.NewFlagSet("server", 0)
|
||||
serverFlagSet.String("address", ":9000", "")
|
||||
ctx := cli.NewContext(app, serverFlagSet, serverFlagSet)
|
||||
|
||||
root, err := newTestConfig(globalMinioDefaultRegion)
|
||||
if err != nil {
|
||||
t.Fatal("Failed to set up test config")
|
||||
@@ -473,6 +479,7 @@ func TestInitServerConfig(t *testing.T) {
|
||||
t.Fatalf("Test %d failed with %v", i+1, tErr)
|
||||
}
|
||||
initServerConfig(ctx)
|
||||
os.Unsetenv(test.envVar)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user