(test TestCase)
| 69 | } |
| 70 | |
| 71 | func createEnvVarsOption(test TestCase) func(c *cmd.Command) { |
| 72 | return func(c *cmd.Command) { |
| 73 | // Add all env variables from parent process |
| 74 | if test.Command.InheritEnv { |
| 75 | for _, v := range os.Environ() { |
| 76 | split := strings.Split(v, "=") |
| 77 | c.AddEnv(split[0], split[1]) |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | // Add custom env variables |
| 82 | for k, v := range test.Command.Env { |
| 83 | c.AddEnv(k, v) |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | func createTimeoutOption(timeout string) (func(c *cmd.Command), error) { |
| 89 | timeoutOpt := cmd.WithoutTimeout |