In the config loader, we require the cluster id to be specified in
authorWard Vandewege <ward@curii.com>
Wed, 1 Jun 2022 16:11:49 +0000 (12:11 -0400)
committerWard Vandewege <ward@curii.com>
Wed, 1 Jun 2022 16:13:55 +0000 (12:13 -0400)
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 <ward@curii.com>

lib/config/load.go
lib/config/load_test.go

index dba799787045d732e3a07cb65859dc7bfa096c6d..a547d1406940960ac9fd88564e0e7c6ee3ce63be 100644 (file)
@@ -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
 }
index feb05cb9515bb03be84352d550c24bf82fe80320..fd2921bd4506cd5eab697f08d87e4782a573f179 100644 (file)
@@ -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.*`)
        }
 }