Skip to content

Add a helper to select an available channel for an OpenShift version #3474

Description

@coderabbitai

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions