NewTestConfig creates a new, ready-to-use instance of a TestConfig.
()
| 513 | |
| 514 | // NewTestConfig creates a new, ready-to-use instance of a TestConfig. |
| 515 | func NewTestConfig() *TestConfig { |
| 516 | return &TestConfig{ |
| 517 | SSHFn: func(u, h, kp string, p int, opts ssh.Options) runner.Runner { |
| 518 | return &MockRunner{} |
| 519 | }, |
| 520 | ListenFn: func(url *url.URL, token string, schemaFunc listen.SchemaFunc, out io.Writer, inCh <-chan []byte) listen.ListenerService { |
| 521 | return &MockListener{} |
| 522 | }, |
| 523 | TerminalFn: func() terminal.Terminal { |
| 524 | return &MockTerminal{} |
| 525 | }, |
| 526 | v: viper.New(), |
| 527 | IsSetMap: make(map[string]bool), |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | // GetGodoClient mocks a GetGodoClient call. The returned godo client will |
| 532 | // be nil. |
no outgoing calls