Skip to content
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

Missing code coverage for Array Results using [] notation #6574

Closed
EmmaMunley opened this issue Apr 24, 2023 · 1 comment · Fixed by #6577
Closed

Missing code coverage for Array Results using [] notation #6574

EmmaMunley opened this issue Apr 24, 2023 · 1 comment · Fixed by #6577
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@EmmaMunley
Copy link
Contributor

EmmaMunley commented Apr 24, 2023

Expected Behavior

I was looking for an unit test of using array indexing to reference results in a pipelineTask.

It was confusing to me since the yaml example file with matrix results is different than the test in pipelinerun.go with the syntax:

https://github.com/XinruZhang/pipeline/blob/8b80e76f7ba28aa0281a7fa9d038f73dddad9b77/examples/v1beta1/pipelineruns/alpha/pipelinerun-with-matrix-and-results.yaml#L17

func TestReconciler_PipelineTaskMatrixWithResults(t *testing.T) {

A

            value:
              - $(tasks.pt-with-result.results.platform-1)
              - $(tasks.pt-with-result.results.platform-2)
              - $(tasks.pt-with-result.results.platform-3)

B

            value:
              - $(tasks.pt-with-result.results.platform[0])
              - $(tasks.pt-with-result.results.platform[1])
              - $(tasks.pt-with-result.results.platform[2])

Actual Behavior

Steps to Reproduce the Problem

Additional Info

  • Kubernetes version:

    Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Client version: 0.30.1
Pipeline version: devel
@EmmaMunley EmmaMunley added the kind/bug Categorizes issue or PR as related to a bug. label Apr 24, 2023
@EmmaMunley
Copy link
Contributor Author

/Assign

EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 24, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 26, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 26, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 26, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 26, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 26, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 27, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 27, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 27, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 27, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 27, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 28, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 28, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 28, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 28, 2023
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.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 28, 2023
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.
tekton-robot pushed a commit that referenced this issue Apr 28, 2023
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: #6574.
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this issue Apr 28, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant