From c119fcd1bfb23a9d3e29d8538867c5328efca97f Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Wed, 1 Jun 2022 12:11:49 -0400 Subject: [PATCH] In the config loader, we require the cluster id to be specified in lowercase. Clarify this in the error message when the cluster id is not valid. refs #19169 Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- lib/config/load.go | 2 +- lib/config/load_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config/load.go b/lib/config/load.go index dba7997870..a547d14069 100644 --- a/lib/config/load.go +++ b/lib/config/load.go @@ -362,7 +362,7 @@ func (ldr *Loader) checkClusterID(label, clusterID string, emptyStringOk bool) e if emptyStringOk && clusterID == "" { return nil } else if !acceptableClusterIDRe.MatchString(clusterID) { - return fmt.Errorf("%s: cluster ID should be 5 alphanumeric characters", label) + return fmt.Errorf("%s: cluster ID should be 5 lowercase alphanumeric characters", label) } return nil } diff --git a/lib/config/load_test.go b/lib/config/load_test.go index feb05cb951..fd2921bd45 100644 --- a/lib/config/load_test.go +++ b/lib/config/load_test.go @@ -406,7 +406,7 @@ Clusters: if v != nil { c.Logf("%#v", v.Clusters) } - c.Check(err, check.ErrorMatches, `.*cluster ID should be 5 alphanumeric characters.*`) + c.Check(err, check.ErrorMatches, `.*cluster ID should be 5 lowercase alphanumeric characters.*`) } } -- 2.30.2