-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Unit Tests for Array Results using [] notation #6577
Add Unit Tests for Array Results using [] notation #6577
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these tests @EmmaMunley!
ad46bff
to
800c8e4
Compare
3f488e8
to
2b83efd
Compare
2b83efd
to
bf5ce34
Compare
bf5ce34
to
998e2cb
Compare
ba3080c
to
4fd1029
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lbernick The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
b0eda73
to
04aabab
Compare
// getTaskRunsForPipelineTask returns the set of TaskRuns associated with the input PipelineRun and PipelineTask | ||
// It will fatal the test if an error occurred. | ||
func getTaskRunsForPipelineTask(ctx context.Context, t *testing.T, clients test.Clients, namespace string, prName string, ptLabel string) map[string]*v1beta1.TaskRun { | ||
t.Helper() | ||
labelSelector := pipeline.PipelineRunLabelKey + "=" + prName + "," + pipeline.PipelineTaskLabelKey + "=" + ptLabel | ||
return getTaskRuns(ctx, t, clients, namespace, labelSelector) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!!
it'd be amazing if you could clean up the other tests to use this function in a follow up PR 🙏🏾
04aabab
to
d4cf0f9
Compare
This commit adds test coverage for a pipeline task that emit an array of results and test string replacements from the array of results using indexing. This addresses issue: tektoncd#6574.
d4cf0f9
to
332fdb2
Compare
/lgtm |
Changes
This PR adds test coverage for a pipeline task that emits an array of results and with string replacements from the array of results using indexing. This closes #6574. It also refactors
getTaskRunsForPipelineRun()
to filter by PT label/kind bug
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes