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

pkg/kubeapiserver/options: Improving test coverage #114234

Merged

Conversation

TommyStarK
Copy link
Contributor

Signed-off-by: TommyStarK thomasmilox@gmail.com

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

If applied this commit will increase the unit tests code coverage of pkg/kubeapiserver/options

  • Initial unit tests code coverage

Screenshot 2022-12-01 at 13 08 39

  • After changes

Screenshot 2022-12-01 at 13 37 37

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Dec 1, 2022
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.26 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.26.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Thu Dec 1 09:40:53 UTC 2022.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 1, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @TommyStarK. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 1, 2022
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 1, 2022
@TommyStarK
Copy link
Contributor Author

Hello @cheftako, @liggitt

I know guys you are super busy and this PR is far from being a priority. As a very new aspiring contributor I am still trying to become familiar with the code and to start helping on small pieces. Hope you don't mind.

Any feedback will be greatly appreciated 😅.

Best regards,

@fedebongio
Copy link
Contributor

/assign @deads2k @cici37 @jpbetz
/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Dec 1, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 1, 2022
Copy link
Contributor

@jpbetz jpbetz left a comment

Choose a reason for hiding this comment

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

/lgtm

Test coverage increase looks great.

I did a pass on the tests and they made sense to me.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2022
@k8s-ci-robot
Copy link
Contributor

@TommyStarK: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
@TommyStarK TommyStarK force-pushed the unit-tests/pkg-kubeapiserver/options branch from d3bdd98 to b52d485 Compare December 2, 2022 09:56
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2022
@aimuz
Copy link
Contributor

aimuz commented Dec 2, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 2, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 2, 2022
@aimuz
Copy link
Contributor

aimuz commented Dec 2, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2022
@TommyStarK
Copy link
Contributor Author

Hello @jpbetz

Thank you for the review :) I updated my PR to correct the two misspelling that made the kubernetes-verify job to fail.

Screenshot 2022-12-02 at 10 59 16

Best,

@TommyStarK
Copy link
Contributor Author

TommyStarK commented Dec 2, 2022

@jpbetz , @aimuz

All pipelines have passed (except tide), don't hesitate if there is anything else I can do.

Best regards,

@jpbetz
Copy link
Contributor

jpbetz commented Dec 2, 2022

/lgtm
/assign @deads2k

@TommyStarK
Copy link
Contributor Author

Hello @deads2k , @liggitt

@jpbetz Thank you very much for your time!

I know guys you are super busy and this is PR is far from a being a priority. Just wanted to give it a last try to get a review/approval.

Best regards,

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2022
@TommyStarK
Copy link
Contributor Author

Hello @jpbetz

I updated my PR to include a suggestion made by @liggitt on another PR. Added a snippet of the expected error string related to the aspect being made invalid to ensure that the config is not getting rejected for an unrelated reason.

Remaining at your disposal.

Best regards,

@TommyStarK TommyStarK force-pushed the unit-tests/pkg-kubeapiserver/options branch from 79369e0 to 3576811 Compare December 13, 2022 13:00
Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

one question about the TTL changes, lgtm otherwise

pkg/kubeapiserver/options/authentication_test.go Outdated Show resolved Hide resolved
Add a snippet of the expected error string related to the aspect being tested

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
@TommyStarK TommyStarK force-pushed the unit-tests/pkg-kubeapiserver/options branch from 3576811 to dfdae9a Compare December 14, 2022 21:15
@TommyStarK
Copy link
Contributor Author

/retest-required

@liggitt
Copy link
Member

liggitt commented Dec 15, 2022

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 15, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpbetz, liggitt, TommyStarK

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2022
@liggitt liggitt added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Dec 15, 2022
@k8s-ci-robot k8s-ci-robot merged commit 3ad2ab1 into kubernetes:master Dec 15, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Dec 15, 2022
@TommyStarK TommyStarK deleted the unit-tests/pkg-kubeapiserver/options branch December 15, 2022 10:17
ivelichkovich pushed a commit to ivelichkovich/kubernetes that referenced this pull request Dec 20, 2022
* pkg/kubeapiserver/options: Improving test coverage

Signed-off-by: TommyStarK <thomasmilox@gmail.com>

* pkg/kubeapiserver/options: Improving test coverage

Add a snippet of the expected error string related to the aspect being tested

Signed-off-by: TommyStarK <thomasmilox@gmail.com>

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
jaehnri pushed a commit to jaehnri/kubernetes that referenced this pull request Jan 3, 2023
* pkg/kubeapiserver/options: Improving test coverage

Signed-off-by: TommyStarK <thomasmilox@gmail.com>

* pkg/kubeapiserver/options: Improving test coverage

Add a snippet of the expected error string related to the aspect being tested

Signed-off-by: TommyStarK <thomasmilox@gmail.com>

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
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/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants