(t *testing.T, command string, fixture json.RawMessage)
| 645 | } |
| 646 | |
| 647 | func assertGoldenSuccessOutputStatuses(t *testing.T, command string, fixture json.RawMessage) { |
| 648 | t.Helper() |
| 649 | |
| 650 | var got jsonOperationOutput |
| 651 | if err := json.Unmarshal(fixture, &got); err != nil { |
| 652 | t.Fatalf("decode golden output for %q: %v", command, err) |
| 653 | } |
| 654 | for i, result := range got.Results { |
| 655 | if result.Status == "" { |
| 656 | t.Errorf("golden output for %q result %d has empty status", command, i) |
| 657 | } |
| 658 | if result.Status == "unknown" { |
| 659 | t.Errorf("golden output for %q result %d must not use unknown status", command, i) |
| 660 | } |
| 661 | if result.Kind == "" { |
| 662 | t.Errorf("golden output for %q result %d has empty kind", command, i) |
| 663 | } |
| 664 | if result.Kind == "unknown" { |
| 665 | t.Errorf("golden output for %q result %d must not use unknown kind", command, i) |
| 666 | } |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | func assertGoldenErrorOutputShape(t *testing.T, name string, fixture json.RawMessage) { |
| 671 | t.Helper() |
no outgoing calls
no test coverage detected