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.
The testenv-based controller tests for HAS were failing because the test environment couldn't see CRDs outside of HAS, so adding them to
CRDDirectoryPaths
insuite_test.go
fixed things. kubernetes-sigs/controller-runtime#1191 outlines the root issue.For the
Trigger
andPipelineRun
CRDs, just referencing the Go module where they are stored was sufficient.Since there isn't a Route CRD that we can use hosted on GitHub, like there is for the Tekton CRDs, to add the Route CRD to the tests, I had to do the following:
controller-gen crd:trivialVersions=true,preserveUnknownFields=false rbac:roleName=manager-role webhook paths="./route/v1" output:crd:artifacts:config=config/
I also updated some of the ComponentDetectionQuery test cases that were added to use a unique resource name for each test. We've found that our delete logic in the tests isn't all that great, and until it's fixed, having a unique name per resource helps to prevent some flaky tests