mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -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:
@@ -50,7 +50,7 @@ func TestServerConfigMigrateV1(t *testing.T) {
|
||||
}
|
||||
|
||||
// Initialize server config and check again if everything is fine
|
||||
if _, err := initConfig(); err != nil {
|
||||
if err := loadConfig(credential{}); err != nil {
|
||||
t.Fatalf("Unable to initialize from updated config file %s", err)
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ func TestServerConfigMigrateV2toV12(t *testing.T) {
|
||||
}
|
||||
|
||||
// Initialize server config and check again if everything is fine
|
||||
if _, err := initConfig(); err != nil {
|
||||
if err := loadConfig(credential{}); err != nil {
|
||||
t.Fatalf("Unable to initialize from updated config file %s", err)
|
||||
}
|
||||
|
||||
@@ -160,11 +160,6 @@ func TestServerConfigMigrateV2toV12(t *testing.T) {
|
||||
if serverConfig.Credential.SecretKey != secretKey {
|
||||
t.Fatalf("Secret key lost during migration, expected: %v, found: %v", secretKey, serverConfig.Credential.SecretKey)
|
||||
}
|
||||
|
||||
// Initialize server config and check again if everything is fine
|
||||
if _, err := initConfig(); err != nil {
|
||||
t.Fatalf("Unable to initialize from updated config file %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Test if all migrate code returns error with corrupted config files
|
||||
|
||||
Reference in New Issue
Block a user