From: Ward Vandewege Date: Wed, 1 Jun 2022 16:11:49 +0000 (-0400) Subject: In the config loader, we require the cluster id to be specified in X-Git-Tag: 2.5.0~147 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/c119fcd1bfb23a9d3e29d8538867c5328efca97f 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 --- 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.*`) } }