Skip to content

Don't fail envtest if directory is missing #65

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

Merged
merged 1 commit into from
Jun 28, 2018

Conversation

pwittrock
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 28, 2018
@@ -39,6 +39,9 @@ type CRDInstallOptions struct {
// CRDs is a list of CRDs to install
CRDs []*apiextensionsv1beta1.CustomResourceDefinition

// ErrorIfPathMissing will cause an error if a Path does not exist
ErrorIfPathMissing bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Sensible default in this case would be true, but its the opposite currently. Consider renaming it something like SkipMissingCRDs ? so that default is *to error if files missing".

Which case do you need this ?

Copy link
Contributor Author

@pwittrock pwittrock Jun 28, 2018

Choose a reason for hiding this comment

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

This is necessary for scaffolded projects without custom resources. I ran into this when creating a new controller-only project for deployments. The scaffolded test tried to read the crds, but the directory didn't exist because there were no user defined resources.

We probably want to scaffold this to default to not-error so that the projects work without custom resources, but pick them up if they are added later.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good.

@droot droot added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jun 28, 2018
@k8s-ci-robot k8s-ci-robot merged commit 89e841b into kubernetes-sigs:master Jun 28, 2018
justinsb pushed a commit to justinsb/controller-runtime that referenced this pull request Dec 7, 2018
Don't fail envtest if directory is missing
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
Set ENTRYPOINT and CMD for Dockerfile.controller
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.

3 participants