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

Remove test builders from validate_params_test.go #3281

Merged

Conversation

popcor255
Copy link
Member

@popcor255 popcor255 commented Sep 24, 2020

Changes

  • Using minimal internal types are simpler than full pipeline objects.
  • Removed duplicate tests

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

/area testing
/kind cleanup

#3178

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. area/testing Issues or PRs related to testing kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 24, 2020
@popcor255
Copy link
Member Author

/cc @imjasonh

@popcor255 popcor255 force-pushed the clean-up-validate-params-test branch 7 times, most recently from 228a0a6 to 76577c1 Compare September 24, 2020 11:54
@popcor255
Copy link
Member Author

/retest all

@popcor255
Copy link
Member Author

/retest

@tekton-robot tekton-robot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. labels Sep 24, 2020
@dlorenc
Copy link
Contributor

dlorenc commented Sep 27, 2020

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test names use underscores instead of blank spaces. Golang test convert blanks to underscores into the terminal anyway. Changing in the code base ahead of time makes it easier to find failed test in editors.

I am not really a fan of doing that change. The fact that go replace converts blank to something is an implementation detail.

A description was added to each test case.

Not a fan of that one either, the name field should be sufficient and it's gonna be extra burden to maintain. Just like most comments, it might become incorrect with what the test actually does.

@vdemeester
Copy link
Member

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 28, 2020
@imjasonh
Copy link
Member

Test names use underscores instead of blank spaces. Golang test convert blanks to underscores into the terminal anyway. Changing in the code base ahead of time makes it easier to find failed test in editors.

I am not really a fan of doing that change. The fact that go replace converts blank to something is an implementation detail.

+1, I've even been changing underscores to spaces in other changes 😆

Not a fan of that one either, the name field should be sufficient and it's gonna be extra burden to maintain. Just like most comments, it might become incorrect with what the test actually does.

Agree here too, test names should be short and descriptive enough to not need a longer description. If you do need to describe something in more detail, that's fine, but I'd do it in a // comment and not in code that gets printed with the test. Having name and description is also inconsistent with other tests throughout the codebase, and I don't think we should update them all to match.

@imjasonh imjasonh removed the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 28, 2020
@imjasonh
Copy link
Member

/kind cleanup

Poking the kind label check 🤞

@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 28, 2020
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2020
@popcor255 popcor255 force-pushed the clean-up-validate-params-test branch 2 times, most recently from 788c949 to 3152e45 Compare September 28, 2020 12:30
@popcor255
Copy link
Member Author

popcor255 commented Sep 28, 2020

@vdemeester @imjasonh Thanks for the feedback! 😄
I made the changes. Could you please can take another look?

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/meow
/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 30, 2020
@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/meow
/hold cancel

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
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 30, 2020
As a developer, it is better to have simple tests. Using minimal internal types are simpler than full pipeline objects. As a result, test builders were removed. There also seemed to be duplicated tests. As a result, removed Duplicated Tests.
@popcor255
Copy link
Member Author

poke @dlorenc

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.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2020
@tekton-robot tekton-robot merged commit 4dd592f into tektoncd:master Oct 6, 2020
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. area/testing Issues or PRs related to testing kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

6 participants