unit tests

Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Casey Lee
2020-02-10 15:27:05 -08:00
parent be75ee20b1
commit 0582306861
466 changed files with 94683 additions and 62526 deletions

View File

@@ -39,6 +39,7 @@ type ContainerSpec struct {
Options string `yaml:"options"`
Entrypoint string
Args string
Name string
}
// Step is the structure of one step in a job
@@ -63,8 +64,8 @@ func (s *Step) GetEnv() map[string]string {
rtnEnv[k] = v
}
for k, v := range s.With {
envKey := fmt.Sprintf("INPUT_%s", strings.ToUpper(k))
envKey = regexp.MustCompile("[^A-Z0-9]").ReplaceAllString(envKey, "_")
envKey := regexp.MustCompile("[^A-Z0-9-]").ReplaceAllString(strings.ToUpper(k), "_")
envKey = fmt.Sprintf("INPUT_%s", strings.ToUpper(envKey))
rtnEnv[envKey] = v
}
return rtnEnv