(t *testing.T, jsonOutput bool)
| 388 | } |
| 389 | |
| 390 | func teamTestCmd(t *testing.T, jsonOutput bool) (*cobra.Command, *bytes.Buffer) { |
| 391 | t.Helper() |
| 392 | var stdout bytes.Buffer |
| 393 | cmd := &cobra.Command{} |
| 394 | cmd.SetOut(&stdout) |
| 395 | if jsonOutput { |
| 396 | cmd.Flags().String(outputFlag, "text", "") |
| 397 | if err := cmd.Flags().Set(outputFlag, "json"); err != nil { |
| 398 | t.Fatalf("set output: %v", err) |
| 399 | } |
| 400 | } |
| 401 | return cmd, &stdout |
| 402 | } |
| 403 | |
| 404 | func decodeTeamOperationOutput[I, R any](t *testing.T, data []byte) teamOperationOutputForTest[I, R] { |
| 405 | t.Helper() |
no outgoing calls
no test coverage detected