diff --git a/pkg/azurefile/azurefile.go b/pkg/azurefile/azurefile.go index d8de55f9f9..e98bcb0d24 100644 --- a/pkg/azurefile/azurefile.go +++ b/pkg/azurefile/azurefile.go @@ -495,10 +495,10 @@ func getStorageAccount(secrets map[string]string) (string, string, error) { } if accountName == "" { - return "", "", fmt.Errorf("could not find accountname or azurestorageaccountname field secrets(%v)", secrets) + return "", "", fmt.Errorf("could not find accountname or azurestorageaccountname field in secrets") } if accountKey == "" { - return "", "", fmt.Errorf("could not find accountkey or azurestorageaccountkey field in secrets(%v)", secrets) + return "", "", fmt.Errorf("could not find accountkey or azurestorageaccountkey field in secrets") } accountName = strings.TrimSpace(accountName) diff --git a/pkg/azurefile/azurefile_test.go b/pkg/azurefile/azurefile_test.go index 1e71e9211b..a9a482d84c 100644 --- a/pkg/azurefile/azurefile_test.go +++ b/pkg/azurefile/azurefile_test.go @@ -416,31 +416,31 @@ func TestGetStorageAccount(t *testing.T) { }, expected1: "", expected2: "", - expected3: fmt.Errorf("could not find accountname or azurestorageaccountname field secrets(map[accountname: accountkey:])"), + expected3: fmt.Errorf("could not find accountname or azurestorageaccountname field in secrets"), }, { options: emptyAccountKeyMap, expected1: "", expected2: "", - expected3: fmt.Errorf("could not find accountkey or azurestorageaccountkey field in secrets(%v)", emptyAccountKeyMap), + expected3: fmt.Errorf("could not find accountkey or azurestorageaccountkey field in secrets"), }, { options: emptyAccountNameMap, expected1: "", expected2: "", - expected3: fmt.Errorf("could not find accountname or azurestorageaccountname field secrets(%v)", emptyAccountNameMap), + expected3: fmt.Errorf("could not find accountname or azurestorageaccountname field secrets"), }, { options: emptyAzureAccountKeyMap, expected1: "", expected2: "", - expected3: fmt.Errorf("could not find accountkey or azurestorageaccountkey field in secrets(%v)", emptyAzureAccountKeyMap), + expected3: fmt.Errorf("could not find accountkey or azurestorageaccountkey field in secrets"), }, { options: emptyAzureAccountNameMap, expected1: "", expected2: "", - expected3: fmt.Errorf("could not find accountname or azurestorageaccountname field secrets(%v)", emptyAzureAccountNameMap), + expected3: fmt.Errorf("could not find accountname or azurestorageaccountname field in secrets"), }, { options: nil, @@ -916,7 +916,7 @@ func TestGetFileShareQuota(t *testing.T) { mockedFileShareResp: storage.FileShare{}, mockedFileShareErr: nil, expectedQuota: -1, - expectedError: fmt.Errorf("could not find accountname or azurestorageaccountname field secrets(map[secrets:secrets])"), + expectedError: fmt.Errorf("could not find accountname or azurestorageaccountname field in secrets"), }, { desc: "Error creating azure client",