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

Refactor: Tidy some imports and tests #4032

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cbandy
Copy link
Member

@cbandy cbandy commented Nov 15, 2024

This adds two functions to internal/controller/runtime to reduce the imports in the pgBackRest controller and adds a linter to keep github.com/pkg/errors out of tests.

This also uses golang.org/x/tools/go/packages to load VolumeSnapshot CRDs from the (already downloaded) client Go module.

@cbandy cbandy force-pushed the tidy-imports branch 2 times, most recently from 669c00c to bfc5907 Compare November 15, 2024 16:45
The default unstructured converter does not complain if you try to
convert a list to an object or vice versa.
Tests already report the line on which an assert fails, and the
standard "errors" packages unwraps errors.
We only use these CRD files in Go tests, and Go has already downloaded
them as part of the module we import for serializing API objects.
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