test: allow installation using a specified GatewayAPI commit #5808
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
There are two ways to install GWAPI CRDs in our testing:
kubernetes-ingress-controller/test/envtest/setup.go
Line 130 in 2888908
kubernetes-ingress-controller/test/e2e/features_test.go
Line 280 in 2888908
However, kustomize does not support the use of short commits generated by go mod,
and go mod also does not support the use of full commit hashes.
This PR introduces a new variable, GATEWAY_API_PACKAGE_VERSION. It will automatically resolve the package version in dependencies through go mod and allow us to use the full commit hash to use the GATEWAY API package.
Which issue this PR fixes:
Special notes for your reviewer:
This PR is from
91d2c60
I used a specific commit hash of GWAPI in #5776 and it has passed the test.
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:- [ ] theCHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR