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

Clean up sink_test.go #413

Merged
merged 1 commit into from
Mar 2, 2020
Merged

Clean up sink_test.go #413

merged 1 commit into from
Mar 2, 2020

Conversation

dibyom
Copy link
Member

@dibyom dibyom commented Feb 4, 2020

Changes

This commit refactors sink_test:

  1. Common setup/comparison extracted to helper methods
  2. Removes some redundant params from the test resources
  3. Remove the test that checks that we respond in 1s or less.
    Since we are using fake clients in these examples, this test is
    not as useful as it being in an e2e test.

Part of #394

Submitter Checklist

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

See the contribution guide for more details.

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 4, 2020
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 4, 2020
@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 75.5% 0.3

@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 5, 2020
@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 73.0% -2.3

@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 73.0% -2.3

@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 73.0% -2.3

@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 73.0% -2.3

@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 73.0% -2.3

@dibyom dibyom marked this pull request as ready for review February 18, 2020 23:15
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 18, 2020
@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 75.0% -0.3

@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 75.2% -0.0

Copy link
Member

@ncskier ncskier left a comment

Choose a reason for hiding this comment

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

Thanks Dibyo, this is a really great step in the right direction for cleaning up these tests! 👍 I just have a few nits about comments, and I have one question. Feel free to ignore any of the nits you don't agree with.

pkg/sink/sink_test.go Outdated Show resolved Hide resolved
pkg/sink/sink_test.go Outdated Show resolved Hide resolved
pkg/sink/sink_test.go Show resolved Hide resolved
pkg/sink/sink_test.go Show resolved Hide resolved
pkg/sink/sink_test.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 75.2% -0.0

This commit refactors sink_test:
1. Common setup/comparison extracted to helper methods
2. Removes some redundant params from the test resources
3. Remove the test that checks that we respond in 1s or less.
Since we are using fake clients in these examples, this test is
not as useful as it being in an e2e test.

Part of tektoncd#394

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 75.3% 75.2% -0.0

Copy link
Member

@ncskier ncskier 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 Mar 2, 2020
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncskier

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 Mar 2, 2020
@tekton-robot tekton-robot merged commit 5de247b into tektoncd:master Mar 2, 2020
@dibyom dibyom mentioned this pull request Apr 27, 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. cla: yes lgtm Indicates that a PR is ready to be merged. 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.

None yet

4 participants