CFWithStdin runs a 'cf' command with a custom stdin and given arguments.
(stdin io.Reader, args ...string)
| 82 | |
| 83 | // CFWithStdin runs a 'cf' command with a custom stdin and given arguments. |
| 84 | func CFWithStdin(stdin io.Reader, args ...string) *Session { |
| 85 | WriteCommand("", nil, args) |
| 86 | command := exec.Command("cf", args...) |
| 87 | command.Stdin = stdin |
| 88 | session, err := Start( |
| 89 | command, |
| 90 | NewPrefixedWriter(DebugOutPrefix, GinkgoWriter), |
| 91 | NewPrefixedWriter(DebugErrPrefix, GinkgoWriter)) |
| 92 | Expect(err).NotTo(HaveOccurred()) |
| 93 | return session |
| 94 | } |
| 95 | |
| 96 | // CFWithEnv runs a 'cf' command with specified environment variables and given arguments. |
| 97 | func CFWithEnv(envVars map[string]string, args ...string) *Session { |
no test coverage detected