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

Validate Test Cases #330

Merged
merged 10 commits into from
Jun 2, 2022
Merged

Validate Test Cases #330

merged 10 commits into from
Jun 2, 2022

Conversation

oshi36
Copy link
Contributor

@oshi36 oshi36 commented May 24, 2022

SignedOff-by : Oshi Gupta oshiagupta36@gmail.com

Related Issue(s)

Partially addresses #3121

Description

As a part of my LFX mentorship task, I am adding test cases and other manifests for the validate policies

Adding different validate policies for which I have added test cases :

Best-Practices Category

  • check-deprecated-apis
    Note: the above is an updated policy for checking deprecation APIs and not the existing one in this policy repo.

Other Category

Trafeik Category

Also, I have moved policies in the folder so that they will not be duplicated in rendering to the website and added the kyverno.io/kyverno-version: 1.6.2 and kyverno.io/kubernetes-version: "1.23" in the polices where it was missing, after checking on the respective versions.

Unique Ingress path policy for Other category has some issue with kyverno CLI , so its test cases are not added in this.

Checklist

  • I have read the policy contribution guidelines.
  • I have added test manifests and resources covering both positive and negative tests that prove this policy works as intended.

@oshi36 oshi36 marked this pull request as draft May 24, 2022 12:09
oshi36 and others added 4 commits May 29, 2022 14:37
Signed-off-by: oshi36 <oshiagupta36@gmail.com>
Signed-off-by: oshi36 <oshiagupta36@gmail.com>
Signed-off-by: oshi36 <oshiagupta36@gmail.com>
@oshi36 oshi36 marked this pull request as ready for review May 29, 2022 09:24
@oshi36 oshi36 changed the title Added Test cases and other manifests for validate policies Validate Test Cases May 29, 2022
@chipzoller
Copy link
Contributor

@oshi36 a couple of things if you please:

  1. There are now conflicts that must be resolved.
  2. Would you mark this as draft until you are finished with adding all necessary tests? This is so it is easier to review one time rather than tracking across scattered commits.

Thank you!

@oshi36
Copy link
Contributor Author

oshi36 commented May 29, 2022

Sure @chipzoller, I will resolve the conflicts.
Also, I have finished adding all the test cases from my side. But as you are suggesting I will mark it as draft.

@chipzoller
Copy link
Contributor

Looks like tests are failing.

@chipzoller
Copy link
Contributor

Conflicts to resolve here.

@oshi36
Copy link
Contributor Author

oshi36 commented Jun 1, 2022

@chipzoller, I have resolved merge conflicts and failed test cases.

@chipzoller chipzoller self-requested a review June 2, 2022 13:11
Copy link
Contributor

@chipzoller chipzoller left a comment

Choose a reason for hiding this comment

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

Thank you, Oshi, this will be of tremendous help in testing future code for regressions. A few of these policies were copied and not moved, but I will clean these up.

@chipzoller chipzoller merged commit 2e6cad9 into kyverno:main Jun 2, 2022
@oshi36
Copy link
Contributor Author

oshi36 commented Jun 2, 2022

Thank you @chipzoller for this.Looking forward to working more with your guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants