mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
Simplify credential usage. (#3893)
This commit is contained in:
@@ -39,6 +39,8 @@ func testAuthenticate(authType string, t *testing.T) {
|
||||
{"user12345678901234567", "pass", errInvalidAccessKeyLength},
|
||||
// Access key contains unsuppported characters.
|
||||
{"!@#$", "pass", errInvalidAccessKeyLength},
|
||||
// Success when access key contains leading/trailing spaces.
|
||||
{" " + serverCred.AccessKey + " ", serverCred.SecretKey, errInvalidAccessKeyLength},
|
||||
// Secret key too small.
|
||||
{"myuser", "pass", errInvalidSecretKeyLength},
|
||||
// Secret key too long.
|
||||
@@ -49,8 +51,6 @@ func testAuthenticate(authType string, t *testing.T) {
|
||||
{serverCred.AccessKey, "mypassword", errAuthentication},
|
||||
// Success.
|
||||
{serverCred.AccessKey, serverCred.SecretKey, nil},
|
||||
// Success when access key contains leading/trailing spaces.
|
||||
{" " + serverCred.AccessKey + " ", serverCred.SecretKey, nil},
|
||||
}
|
||||
|
||||
// Run tests.
|
||||
|
||||
Reference in New Issue
Block a user