Use compat_otp library in extended test cases #5347
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 I did
WIP
We hit this: openshift-eng/openshift-tests-extension#41
Summary
The test list was empty because the default ModuleTestsOnly() filter was excluding ALL tests that had any /vendor/ path in their code locations array. Since our MCO tests use compat_otp from the origin library, their code locations
include paths like:
/home/fedora/Workspace/machine-config-operator/vendor/github.com/openshift/origin/test/extended/util/client.go:183
Even though the PRIMARY code location was:
/home/fedora/Workspace/machine-config-operator/test/extended/mco_ocb.go:13
The standard ModuleTestsOnly() filter (which checks if ANY code location contains /vendor/) was filtering them out.
The Fix:
I implemented a custom filter in cmd/machine-config-tests-ext/main.go that only filters out tests where the FIRST (primary) code location is in the vendor directory. This allows our MCO tests, which are defined in test/extended/ but
call into compat_otp utilities, to be included in the test list.
- How to verify it
- Description for the changelog