(t *testing.T, data []byte)
| 402 | } |
| 403 | |
| 404 | func decodeTeamOperationOutput[I, R any](t *testing.T, data []byte) teamOperationOutputForTest[I, R] { |
| 405 | t.Helper() |
| 406 | var got teamOperationOutputForTest[I, R] |
| 407 | if err := json.Unmarshal(data, &got); err != nil { |
| 408 | t.Fatalf("decode JSON output: %v\noutput: %s", err, string(data)) |
| 409 | } |
| 410 | if got.Warnings == nil { |
| 411 | t.Fatalf("warnings = nil, want empty array") |
| 412 | } |
| 413 | if len(got.Warnings) != 0 { |
| 414 | t.Fatalf("warnings = %#v, want empty", got.Warnings) |
| 415 | } |
| 416 | return got |
| 417 | } |
| 418 | |
| 419 | func onlyTeamResult[I, R any](t *testing.T, got teamOperationOutputForTest[I, R]) teamOperationResultForTest[I, R] { |
| 420 | t.Helper() |
no outgoing calls
no test coverage detected