MCPcopy Create free account
hub / github.com/devfile/api / addEnv

Function addEnv

test/v200/utils/common/command_test_utils.go:46–54  ·  view source on GitHub ↗

addEnv creates and returns a specifed number of env attributes in a schema structure

(numEnv int)

Source from the content-addressed store, hash-verified

44
45// addEnv creates and returns a specifed number of env attributes in a schema structure
46func addEnv(numEnv int) []schema.EnvVar {
47 commandEnvs := make([]schema.EnvVar, numEnv)
48 for i := 0; i < numEnv; i++ {
49 commandEnvs[i].Name = "Name_" + GetRandomString(5, false)
50 commandEnvs[i].Value = "Value_" + GetRandomString(5, false)
51 LogInfoMessage(fmt.Sprintf("Add Env: %s", commandEnvs[i]))
52 }
53 return commandEnvs
54}
55
56// addAttributes creates returns a specifed number of attributes in a schema structure
57func addAttributes(numAtrributes int) map[string]string {

Callers 2

SetExecCommandValuesMethod · 0.85

Calls 2

GetRandomStringFunction · 0.85
LogInfoMessageFunction · 0.85

Tested by

no test coverage detected