Skip to content

Refactor rhel7_contenthost and rhel8_contenthost fixtures to use rhel_contenthost #19977

@ogajduse

Description

@ogajduse

Background

The current rhel7_contenthost and rhel8_contenthost oracle_host and centos_host fixtures have diverged from the generic rhel_contenthost fixture, leading to maintenance issues and code duplication. The recent PRs #19950 and #19967 have highlighted problems with network type handling and deploy_network_type parameter conflicts.

As noted by @ogajduse in PR #19967, there are reasons for not using settings.content_host.network_type directly, referencing discussion in PR #18469.

Currently, these version-specific fixtures are causing:

  1. Parameter conflicts: deploy_network_type is being passed both through host_conf(request) and explicitly in fixture definitions
  2. Code duplication: Version-specific fixtures repeat logic that exists in the generic fixture
  3. Maintenance overhead: Changes need to be made in multiple places
  4. Testing complexity: The fixtures don't properly support IPv4/IPv6 parametrization like other content host tests

Expected Steps:

  • Research the original reasons for separate rhel7/rhel8 fixtures and ensure refactoring addresses those concerns
  • Review the network type handling discussion from PR Core fixture - Multiple registered contenthosts #18469 to understand constraints
  • Analyze current usage patterns of rhel7_contenthost and rhel8_contenthost across the test suite
  • Design a unified approach that leverages the parametrized rhel_contenthost fixture
  • Remove hardcoded version-specific fixtures in favor of parametrized rhel_contenthost usage
  • Update all test files using rhel7_contenthost and rhel8_contenthost to use the generic fixture with proper parametrization
  • Ensure IPv4/IPv6 dualstack testing works correctly for all affected tests
  • Validate that convert2rhel tests work properly with both IPv4 and IPv6 networks

Definition of Done:

  • rhel7_contenthost and rhel8_contenthost fixtures are removed or significantly simplified
  • All tests using these fixtures are migrated to use rhel_contenthost with appropriate parametrization
  • Network type handling is consistent across all content host fixtures
  • No deploy_network_type parameter conflicts exist
  • IPv4/IPv6 parametrization works correctly for version-specific content host tests
  • All existing functionality is preserved while reducing code duplication
  • PRT passes for affected test suites including convert2rhel tests

Related Issues:

This refactoring will resolve the current maintenance burden and parameter conflicts while ensuring proper IPv4/IPv6 support across all content host fixtures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TestFailureIssues and PRs related to a test failing in automation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions