diff --git a/pkg/repository/config/azure.go b/pkg/repository/config/azure.go index 7716c73c7e..1c203330e1 100644 --- a/pkg/repository/config/azure.go +++ b/pkg/repository/config/azure.go @@ -112,9 +112,8 @@ func getStorageAccountKey(config map[string]string) (string, error) { var storageKey string for _, key := range *res.Keys { - // uppercase both strings for comparison because the ListKeys call returns e.g. "FULL" but - // the storagemgmt.Full constant in the SDK is defined as "Full". - if strings.ToUpper(string(key.Permissions)) == strings.ToUpper(string(storagemgmt.Full)) { + // The ListKeys call returns e.g. "FULL" but the storagemgmt.Full constant in the SDK is defined as "Full". + if strings.EqualFold(string(key.Permissions), string(storagemgmt.Full)) { storageKey = *key.Value break } diff --git a/test/e2e/util/velero/velero_utils.go b/test/e2e/util/velero/velero_utils.go index 2a471c53ac..5805cdd58e 100644 --- a/test/e2e/util/velero/velero_utils.go +++ b/test/e2e/util/velero/velero_utils.go @@ -462,9 +462,9 @@ func VeleroScheduleCreate(ctx context.Context, veleroCLI string, veleroNamespace func VeleroSchedulePause(ctx context.Context, veleroCLI string, veleroNamespace string, scheduleName string) error { var args []string - args = append([]string{ + args = []string{ "--namespace", veleroNamespace, "schedule", "pause", scheduleName, - }) + } if err := VeleroCmdExec(ctx, veleroCLI, args); err != nil { return err } @@ -473,9 +473,9 @@ func VeleroSchedulePause(ctx context.Context, veleroCLI string, veleroNamespace func VeleroScheduleUnpause(ctx context.Context, veleroCLI string, veleroNamespace string, scheduleName string) error { var args []string - args = append([]string{ + args = []string{ "--namespace", veleroNamespace, "schedule", "unpause", scheduleName, - }) + } if err := VeleroCmdExec(ctx, veleroCLI, args); err != nil { return err }