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

adding unit tests for pipelineTaskList.Deps #3597

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

pritidesai
Copy link
Member

@pritidesai pritidesai commented Dec 3, 2020

Changes

Adding unit tests to validate pipelineTaskList.Deps() returning correct dependencies.

Changing orderingDeps() to avoid calling resourceDeps() and checking for duplicates since pipelineTaskList.Dep() returns a unique set of dependencies (using sets) for all pipelineTasks.

/kind misc

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Dec 3, 2020
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 3, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 72.4% 83.3% 10.9

Copy link
Member

@jerop jerop left a 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 @pritidesai!

given that you also fixed the check for uniqueness of deps, maybe we can add a test that has duplicate deps and validate that the elements in the deps list are unique...

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 72.4% 83.3% 10.9

@pritidesai
Copy link
Member Author

given that you also fixed the check for uniqueness of deps, maybe we can add a test that has duplicate deps and validate that the elements in the deps list are unique...

Good point @jerop, it had a check where the same task (task-1) was specified in runAfter and also in inputs. I have added a separate test on uniqueness.

@bobcatfish
Copy link
Collaborator

Looks like this might be more instances of #2656

/test pull-tekton-pipeline-integration-tests

@jerop
Copy link
Member

jerop commented Dec 4, 2020

/lgtm
/meow

@tekton-robot
Copy link
Collaborator

@jerop: cat image

In response to this:

/lgtm
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
Adding unit tests to validate pipelineTaskList.Deps returning correct
depedencies.

Changing orderingDeps() to avoid calling resourceDeps() and checking for
duplicates since Deps() returns a unique set of dependencies for any
pipelineTask.
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 74.2% 84.5% 10.3

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2021
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop, vdemeester

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pritidesai
Copy link
Member Author

lgtm please 🙏

@ghost
Copy link

ghost commented Jan 29, 2021

/lgtm

@tekton-robot tekton-robot assigned ghost Jan 29, 2021
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2021
@ghost
Copy link

ghost commented Jan 29, 2021

/test check-pr-has-kind-label

@ghost ghost removed the kind/misc Categorizes issue or PR as a miscellaneuous one. label Jan 29, 2021
@tekton-robot tekton-robot merged commit 0c297cc into tektoncd:master Jan 29, 2021
@ghost ghost added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Jan 29, 2021
@pritidesai pritidesai deleted the deps-unit-test branch January 29, 2021 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants