upgrade linter and cleanup makefile (#126)
This commit is contained in:
@@ -28,12 +28,9 @@ import (
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/minio/minio/pkg/event/target"
|
||||
|
||||
"github.com/minio/minio/cmd/config"
|
||||
|
||||
"github.com/minio/mcs/models"
|
||||
|
||||
"github.com/minio/minio/cmd/config"
|
||||
"github.com/minio/minio/pkg/event/target"
|
||||
"github.com/minio/minio/pkg/madmin"
|
||||
)
|
||||
|
||||
@@ -532,7 +529,7 @@ func Test_getConfig(t *testing.T) {
|
||||
|
||||
// mock function response from getConfig()
|
||||
minioGetConfigKVMock = func(key string) ([]byte, error) {
|
||||
return nil, errors.New("Invalid config")
|
||||
return nil, errors.New("invalid config")
|
||||
}
|
||||
|
||||
mockConfigList := madmin.Help{}
|
||||
@@ -553,7 +550,7 @@ func Test_getConfig(t *testing.T) {
|
||||
mock: func() {
|
||||
// mock function response from getConfig()
|
||||
minioGetConfigKVMock = func(key string) ([]byte, error) {
|
||||
return nil, errors.New("Invalid config")
|
||||
return nil, errors.New("invalid config")
|
||||
}
|
||||
// mock function response from listConfig()
|
||||
minioHelpConfigKVMock = func(subSys, key string, envOnly bool) (madmin.Help, error) {
|
||||
|
||||
@@ -163,10 +163,10 @@ var STSClient = PrepareSTSClient()
|
||||
func newMcsCredentials(accessKey, secretKey, location string) (*credentials.Credentials, error) {
|
||||
mcsEndpoint := getMinIOServer()
|
||||
if mcsEndpoint == "" {
|
||||
return nil, errors.New("STS endpoint cannot be empty")
|
||||
return nil, errors.New("endpoint cannot be empty for AssumeRoleSTS")
|
||||
}
|
||||
if accessKey == "" || secretKey == "" {
|
||||
return nil, errors.New("AssumeRole credentials access/secretkey is mandatory")
|
||||
return nil, errors.New("creredentials access/secretkey is mandatory for AssumeRoleSTS")
|
||||
}
|
||||
|
||||
// Future authentication methods can be added under this switch statement
|
||||
|
||||
@@ -126,7 +126,7 @@ func Test_getConfiguredRegion(t *testing.T) {
|
||||
mock: func() {
|
||||
// mock function response from getConfig()
|
||||
minioGetConfigKVMock = func(key string) ([]byte, error) {
|
||||
return nil, errors.New("Invalid config")
|
||||
return nil, errors.New("invalid config")
|
||||
}
|
||||
// mock function response from listConfig()
|
||||
minioHelpConfigKVMock = func(subSys, key string, envOnly bool) (madmin.Help, error) {
|
||||
|
||||
Reference in New Issue
Block a user