NewCmdWithEnv creates a cmd object configured with the test environment set with additional env vars
(envvars []string, command string, args ...string)
| 295 | |
| 296 | // NewCmdWithEnv creates a cmd object configured with the test environment set with additional env vars |
| 297 | func (c *CLI) NewCmdWithEnv(envvars []string, command string, args ...string) icmd.Cmd { |
| 298 | // base env -> CLI overrides -> cmd overrides |
| 299 | cmdEnv := append(c.BaseEnvironment(), c.env...) |
| 300 | cmdEnv = append(cmdEnv, envvars...) |
| 301 | return icmd.Cmd{ |
| 302 | Command: append([]string{command}, args...), |
| 303 | Env: cmdEnv, |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | // MetricsSocket get the path where test metrics will be sent |
| 308 | func (c *CLI) MetricsSocket() string { |