Add a helper to select an available channel for an OpenShift version
Open
@amandahla is already working on this.
Since Aug 18, 2026.
- Dominant language
- Go
- Stars
- 103
- Forks
- 257
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
Summary
Add a reusable test helper that takes an OpenShift version identifier and obtains the version's availableChannels from the OCM endpoint:
/api/clusters_mgmt/v1/versions/{version id}
Use the helper where E2E tests need a channel for a selected version.
Rationale
Tests must not hard-code a channel such as eus-4.16. The channels available for a version can change. The helper must derive a valid channel from the current OCM version metadata.
The current test can omit --channel. This follow-up provides the reusable helper for tests that must explicitly select a channel.
Affected area
tests/e2e/test_rosacli_cluster.go- Test utilities that access OCM version metadata
Acceptance criteria
- The helper accepts an OpenShift version identifier.
- The helper queries
/api/clusters_mgmt/v1/versions/{version id}. - The helper returns channel data from
availableChannels. - The helper handles missing or empty
availableChannelswith a clear error. - E2E tests that require an explicit channel use the helper instead of a hard-coded channel value.
- Add focused test coverage for the helper.
References
- Pull request: https://github.com/openshift/rosa/pull/3472
- Review discussion: https://github.com/openshift/rosa/pull/3472#discussion_r3798173327
- Pull request review: https://github.com/openshift/rosa/pull/3472#pullrequestreview-4953820125
- Requested by: @amandahla
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.