listPlanUIDs returns every plan UID in the project, via the public gRPC ListPlans API. UIDs are parsed from the resource names.
(ctx context.Context, t *testing.T, ctl *controller, projectName string)
| 395 | // listPlanUIDs returns every plan UID in the project, via the public gRPC |
| 396 | // ListPlans API. UIDs are parsed from the resource names. |
| 397 | func listPlanUIDs(ctx context.Context, t *testing.T, ctl *controller, projectName string) []int64 { |
| 398 | t.Helper() |
| 399 | a := require.New(t) |
| 400 | resp, err := ctl.planServiceClient.ListPlans(ctx, connect.NewRequest(&v1pb.ListPlansRequest{ |
| 401 | Parent: projectName, |
| 402 | PageSize: 1000, |
| 403 | })) |
| 404 | a.NoError(err, "ListPlans(%s)", projectName) |
| 405 | out := make([]int64, 0, len(resp.Msg.Plans)) |
| 406 | for _, p := range resp.Msg.Plans { |
| 407 | _, uid, err := common.GetProjectIDPlanID(p.Name) |
| 408 | a.NoError(err, "parse plan name %q", p.Name) |
| 409 | out = append(out, uid) |
| 410 | } |
| 411 | return out |
| 412 | } |
| 413 | |
| 414 | // listIssueUIDs returns every issue UID in the project. |
| 415 | func listIssueUIDs(ctx context.Context, t *testing.T, ctl *controller, projectName string) []int64 { |
no test coverage detected