Skip to content

Commit

Permalink
fix: buildid
Browse files Browse the repository at this point in the history
  • Loading branch information
jzli committed Aug 12, 2022
1 parent ee62331 commit f3f7a3c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugin/client/testplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ func (p *testPlan) List(

uri := fmt.Sprintf("projects/%s/testplans", params.ProjectID)
options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list),
QueryOpts(map[string]string{"name": params.Search}))
QueryOpts(map[string]string{
"name": params.Search,
"buildID": params.BuildID,
}))
if err := p.client.Get(ctx, baseURL, uri, options...); err != nil {
return nil, err
}
Expand All @@ -73,7 +76,9 @@ func (p *testPlan) Get(ctx context.Context, baseURL *duckv1.Addressable, params
tc := &metav1alpha1.TestPlan{}

uri := fmt.Sprintf("projects/%s/testplans/%s", params.ProjectID, params.TestPlanID)
options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(tc))
options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(tc), QueryOpts(map[string]string{
"buildID": params.BuildID,
}))
if err := p.client.Get(ctx, baseURL, uri, options...); err != nil {
return nil, err
}
Expand Down

0 comments on commit f3f7a3c

Please sign in to comment.