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

🌱 Add the unit tests in pkg/model/config/config_test.go for HasWebhook #1909

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

prafull01
Copy link
Contributor

Description
Add the HasWebhook() unit tests to improve the coverage.

Motivation
Follow up of the PR #1903 where the HasWebhook() function is introduced.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 15, 2020
@prafull01
Copy link
Contributor Author

/test pull-kubebuilder-e2e-k8s-1-17-0

@prafull01
Copy link
Contributor Author

/cc @camilamacedo86

@prafull01
Copy link
Contributor Author

/test pull-kubebuilder-e2e-k8s-1-17-0

Expect(c.Resources).To(Equal([]ResourceData{gvk3}))
Expect(c.HasWebhook(gvk3)).To(BeTrue())
})
It("should return false when config has a webhook with the GVK", func() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
It("should return false when config has a webhook with the GVK", func() {
It("should return false when config has NOT a webhook with the GVK", func() {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@Adirio Adirio left a comment

Choose a reason for hiding this comment

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

Some english related comments:

pkg/model/config/config_test.go Outdated Show resolved Hide resolved
pkg/model/config/config_test.go Outdated Show resolved Hide resolved
@prafull01
Copy link
Contributor Author

Some english related comments:

@Adirio Fixed those.

@camilamacedo86
Copy link
Member

Hi @prafull01,

All fine here. Since we are only adding tests the correct mojo is: Infra/Tests/Other: 🌱 (:seedling:).
I will update it for we are able to merge this one.

@camilamacedo86 camilamacedo86 changed the title ✨ Add the unit tests for HasWebhook 🌱 Add the unit tests in pkg/model/config/config_test.go for HasWebhook Dec 16, 2020
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/approve
/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 16, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, prafull01

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 16, 2020
@k8s-ci-robot k8s-ci-robot merged commit c9114ed into kubernetes-sigs:master Dec 16, 2020
@prafull01 prafull01 deleted the config-unit-test branch December 16, 2020 09:37
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants