-
Notifications
You must be signed in to change notification settings - Fork 65
🌱 test: Improve registry+v1 render regression test #2103
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
base: main
Are you sure you want to change the base?
🌱 test: Improve registry+v1 render regression test #2103
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9be93c2
to
f32fc0e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2103 +/- ##
==========================================
+ Coverage 73.60% 73.63% +0.02%
==========================================
Files 78 78
Lines 7260 7260
==========================================
+ Hits 5344 5346 +2
+ Misses 1566 1565 -1
+ Partials 350 349 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
311dab9
to
36ae501
Compare
f7a2e82
to
0abdf8f
Compare
0abdf8f
to
1ea2527
Compare
@@ -1,7 +0,0 @@ | |||
## registry+v1 bundle generation regression tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not need the readme anymore
now, the code is documented and we can clarify on it directly to simplify
1ea2527
to
6d713af
Compare
6d713af
to
8a66074
Compare
@@ -252,6 +246,10 @@ test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests | |||
$(UNIT_TEST_DIRS) \ | |||
-test.gocoverdir=$(COVERAGE_UNIT_DIR) | |||
|
|||
.PHONY: test-regression | |||
test-regression: #HELP Run regression test | |||
go test -count=1 -v ./test/regression/... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now have a dedicated directory for regression tests, so it's easy to add more cases in the future.
It also makes it very clear what this test does and why it's there.
@@ -172,15 +172,9 @@ generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyI | |||
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) object:headerFile="hack/boilerplate.go.txt" paths="./..." | |||
|
|||
.PHONY: verify | |||
verify: k8s-pin kind-verify-versions fmt generate manifests crd-ref-docs generate-test-data #HELP Verify all generated code is up-to-date. Runs k8s-pin instead of just tidy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If make verify
failed in CI, most people would just run it locally and push the changes — that’s normal since verify
usually runs things like go fmt
, vet
, and controller-gen
(as in all OF projects). But it was also re-generating regression test output — which should never change or at least very unlikely change. Then:
- If that output changed because of a bug, we could accidentally miss it and merge a regression.
- It also wasn’t clear to reviewers that files in
testdata/expected-manifests/
should never be edited or auto-regenerated. - Expecting everyone to remember to check that manually is risky and easy to miss.
Simplify and fix render regression test
make verify
.make verify
is used for codegen (go fmt
,controller-gen
, etc), not for regenerating testdata that should never change.See context
This PR:
testdata/
, following Go test conventions.Safer, clearer, and avoids mistakes in reviews.