updates for tests

This commit is contained in:
Casey Lee committed 2020-02-21 22:19:59 -08:00
1 parent 2cb276ca05
commit 9179d8924d
3 files changed
+7 -5

No files matched your search

+3 -2
View File
@@ -267,8 +267,9 @@ func (rc *RunContext) createStepContainerName(stepID string) string {
prefix := regexp.MustCompile("[^a-zA-Z0-9]").ReplaceAllString(rc.createContainerName(), "-")
suffix := regexp.MustCompile("[^a-zA-Z0-9]").ReplaceAllString(stepID, "-")
containerName := trimToLen(prefix, 30-len(suffix))
return fmt.Sprintf("%s%s%s", prefix, containerName, suffix)
prefix = trimToLen(prefix, 30-(1+len(suffix)))
name := strings.Trim(fmt.Sprintf("%s-%s", prefix, suffix), "-")
return name
}
func trimToLen(s string, l int) string {