(a *require.Assertions, want, got []*v1pb.PlanCheckRun_Result, expectedTarget, message string)
| 528 | } |
| 529 | |
| 530 | func equalReviewResultProtos(a *require.Assertions, want, got []*v1pb.PlanCheckRun_Result, expectedTarget, message string) { |
| 531 | a.Equal(len(want), len(got), message) |
| 532 | for i := 0; i < len(want); i++ { |
| 533 | // Verify target matches expected database |
| 534 | a.Equal(expectedTarget, got[i].Target, message) |
| 535 | // Verify type is STATEMENT_ADVISE (we filter for this type) |
| 536 | a.Equal(v1pb.PlanCheckRun_Result_STATEMENT_ADVISE, got[i].Type, message) |
| 537 | // Compare other fields, ignoring target and type since we checked them above |
| 538 | diff := cmp.Diff(want[i], got[i], protocmp.Transform(), |
| 539 | protocmp.IgnoreFields(&v1pb.PlanCheckRun_Result{}, "target", "type")) |
| 540 | a.Empty(diff, message) |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | func prodTemplateReviewConfigForPostgreSQL() *v1pb.ReviewConfig { |
| 545 | config := &v1pb.ReviewConfig{ |
no test coverage detected