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

fix: adds missing CRDs for k8s EnvTest #584

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

bartoszmajsak
Copy link
Contributor

@bartoszmajsak bartoszmajsak commented Oct 2, 2023

Description

After latest merges EvnTest tests stopped working. This PR addresses the problems by:

  • adds download of needed CRDs to config/crd/external when running make manifests target
  • adds missing scheme installation in the test setup
  • passes ns when creating UserGroup resource
  • marks one test as Pending due to NetworkPolicies being disabled right now

How Has This Been Tested?

make test

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

- introduces make func to download needed CRDs to config/crd/external when running make manifests target
- adds missing scheme installation in test setup
- marks one test as Pending due to NetworkPolicies being disabled right now
@@ -48,7 +48,8 @@ var _ = Describe("DataScienceCluster initialization", func() {
Expect(foundMonitoringNamespace.Name).Should(Equal(monitoringNamespace))
})

It("Should create default network policy", func() {
// Currently commented out in the DSCI reconcile - setting test to Pending
PIt("Should create default network policy", func() {
Copy link
Member

Choose a reason for hiding this comment

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

P ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, otherwise the test will fail as the code for creating NetworkPolicy is commented out. PIt - marks test case as Pending in the execution report. You can also XIt - exclude it, and FIt - focus test suite to run only tests with F

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was hoping that the comment one line above makes it clear :)

Copy link
Member

Choose a reason for hiding this comment

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

ah, nice ! new things learnt every day

Makefile Outdated Show resolved Hide resolved
@zdtsw zdtsw added the odh-1.11 label Oct 2, 2023
Copy link
Member

@VaishnaviHire VaishnaviHire left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @bartoszmajsak

Just a note, this did not show up in CI, as we directly to docker build.. in CI job.

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Oct 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: VaishnaviHire

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

@openshift-ci openshift-ci bot added the approved label Oct 2, 2023
@VaishnaviHire VaishnaviHire merged commit dbab421 into opendatahub-io:incubation Oct 2, 2023
@bartoszmajsak bartoszmajsak deleted the fix_crd_for_tests branch October 4, 2023 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants