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

increase code cov for sources #1343

Merged
merged 11 commits into from
Jun 25, 2021
Merged

Conversation

itsmurugappan
Copy link
Contributor

@itsmurugappan itsmurugappan commented Jun 12, 2021

Description

Increase code coverage for sources

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 12, 2021
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 12, 2021
@codecov
Copy link

codecov bot commented Jun 12, 2021

Codecov Report

Merging #1343 (a2ee858) into main (217df5c) will increase coverage by 0.83%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
+ Coverage   72.97%   73.80%   +0.83%     
==========================================
  Files         160      160              
  Lines        8151     8075      -76     
==========================================
+ Hits         5948     5960      +12     
+ Misses       1476     1416      -60     
+ Partials      727      699      -28     
Impacted Files Coverage Δ
pkg/kn/commands/source/apiserver/create.go 82.60% <ø> (+10.60%) ⬆️
pkg/kn/commands/source/container/create.go 90.00% <100.00%> (+22.55%) ⬆️
pkg/kn/commands/source/container/describe.go 76.27% <100.00%> (+26.27%) ⬆️
pkg/kn/commands/source/container/update.go 86.95% <100.00%> (+25.73%) ⬆️
cmd/kn/main.go 40.00% <0.00%> (-25.72%) ⬇️
pkg/kn/commands/channel/list_types.go 64.70% <0.00%> (-5.89%) ⬇️
pkg/kn/commands/source/list_types.go 56.86% <0.00%> (-5.89%) ⬇️
pkg/kn/commands/testing_helper.go 75.00% <0.00%> (ø)
pkg/kn/commands/source/apiserver/describe.go 72.88% <0.00%> (+3.38%) ⬆️
pkg/kn/commands/source/ping/describe.go 74.07% <0.00%> (+3.70%) ⬆️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 217df5c...a2ee858. Read the comment docs.

@itsmurugappan
Copy link
Contributor Author

/hold

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 12, 2021
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 13, 2021
@dsimansk
Copy link
Contributor

Can you rerun Error: Please run ./hack/update-codegen.sh. pls? Probably a conflict from main merge.

Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

/ok-to-test
Left a comment. Thanks for doing this. Seems like a third_party dependency is causing some of the issue in CI.

APIVersion: resourceVersion,
Kind: resourceKind,
}}
func createAPIServerSource(name, serviceAccount, mode string, resourceKind, resourceVersion []string, ceOverrides map[string]string, sink duckv1.Destination) *v1.ApiServerSource {
Copy link
Contributor

Choose a reason for hiding this comment

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

Whenever I see a function with so many parameters (in code or test) I wonder whether a struct should be created to hold the related params and the struct passed to the func or be a method?

@knative-prow-robot knative-prow-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 14, 2021
@dsimansk
Copy link
Contributor

@itsmurugappan wrt the verify error, In my case I've update go-license tool to get the same result as CI.

go install github.com/google/go-licenses@latest

@navidshaikh
Copy link
Collaborator

/retitle increase code cov for sources

@knative-prow-robot knative-prow-robot changed the title increase code cov for ping source increase code cov for sources Jun 15, 2021
@knative-prow-robot knative-prow-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 Jun 22, 2021
Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

/lgtm

@itsmurugappan: thanks! Are you going to add more more to the PR? else please unhold

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 22, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: itsmurugappan, navidshaikh

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2021
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2021
@itsmurugappan
Copy link
Contributor Author

@navidshaikh i have pushed some more changes. This PR is good to go. I am also working on a follow up or with some unit tests to increase the coverage.
/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 23, 2021
@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/kn/commands/source/apiserver/create.go 83.3% 88.2% 4.9
pkg/kn/commands/source/apiserver/delete.go 82.4% 88.2% 5.9
pkg/kn/commands/source/apiserver/describe.go 84.7% 86.4% 1.7
pkg/kn/commands/source/apiserver/update.go 75.5% 87.8% 12.2
pkg/kn/commands/source/container/create.go 84.4% 93.5% 9.2
pkg/kn/commands/source/container/delete.go 82.4% 88.2% 5.9
pkg/kn/commands/source/container/describe.go 58.6% 87.9% 29.3
pkg/kn/commands/source/container/update.go 78.9% 91.9% 12.9
pkg/kn/commands/source/ping/delete.go 85.7% 92.9% 7.1
pkg/kn/commands/source/ping/describe.go 84.9% 86.8% 1.9
pkg/kn/commands/source/ping/update.go 77.3% 90.9% 13.6

@dsimansk
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2021
@knative-prow-robot knative-prow-robot merged commit 4da6475 into knative:main Jun 25, 2021
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 Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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