setupCommandOutput configures a cobra command to use a null writer for output capture.
(t *testing.T, cmd *cobra.Command)
| 22 | |
| 23 | // setupCommandOutput configures a cobra command to use a null writer for output capture. |
| 24 | func setupCommandOutput(t *testing.T, cmd *cobra.Command) { |
| 25 | t.Helper() |
| 26 | |
| 27 | cmd.SetOut(&nullWriter{}) |
| 28 | cmd.SetErr(&nullWriter{}) |
| 29 | } |
| 30 | |
| 31 | func TestParseAgentType(t *testing.T) { |
| 32 | tests := []struct { |
no outgoing calls
no test coverage detected