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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 added tests for version.go #3361

Closed
wants to merge 2 commits into from

Conversation

khareyash05
Copy link
Member

added tests for pkg/cli/version.go

Fixes #3211

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 22, 2023
@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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 22, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @khareyash05. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

@camilamacedo86
Copy link
Member

/ok-to-test
/approved
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 22, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 22, 2023
camilamacedo86
camilamacedo86 previously approved these changes Apr 22, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 22, 2023
It("prints the version number", func() {
err := cmd.Execute()
Expect(err).ToNot(HaveOccurred())
Expect(buf.String()).To(Equal("1.0.0\n"))
Copy link
Member

Choose a reason for hiding this comment

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

@khareyash05 it is failing

Screenshot 2023-04-22 at 19 41 27

You can either run it locally to fix it out.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 23, 2023
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@khareyash05
Copy link
Member Author

@camilamacedo86 Kindly review

@camilamacedo86
Copy link
Member

Hi @khareyash05,

See that the test is still not working. Note that you can test it locally either:

[FAILED] Expected success, but got an error:
<*errors.errorString | 0xc0003f8f20>:
version string
{s: "version string"}
In [It] at: /home/prow/go/src/sigs.k8s.io/kubebuilder/pkg/cli/cli_test.go:477 @ 04/23/23 06:30:54.512

We are more than happy to get this one merged when it be fixed.
Could you please look into that?

/approved cancel

removed extralines

updated tests

Create version_test.go
@camilamacedo86 camilamacedo86 dismissed their stale review April 23, 2023 18:28

the test must be fixed so that we can get this one merged

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: khareyash05
Once this PR has been reviewed and has the lgtm label, please ask for approval from camilamacedo86. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2023
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 24, 2023
@k8s-ci-robot
Copy link
Contributor

@khareyash05: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubebuilder-e2e-k8s-1-26-0 099a6bc link true /test pull-kubebuilder-e2e-k8s-1-26-0
pull-kubebuilder-test 39b1ec3 link true /test pull-kubebuilder-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase the test coverage with unit tests
3 participants