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
availableChannels with 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
Summary
Add a reusable test helper that takes an OpenShift version identifier and obtains the version's
availableChannelsfrom 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.goAcceptance criteria
/api/clusters_mgmt/v1/versions/{version id}.availableChannels.availableChannelswith a clear error.References