Skip to content

Commit

Permalink
[6.15.z] Add Satellite Network Type Attribute to Results (#15876)
Browse files Browse the repository at this point in the history
Add Satellite Network Type Attribute to Results (#15824)

(cherry picked from commit cb3bcf4)

Co-authored-by: Jitendra Yejare <jyejare@redhat.com>
  • Loading branch information
Satellite-QE and jyejare authored Aug 7, 2024
1 parent 98e258b commit d1f6ee1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pytest_plugins/metadata_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def pytest_collection_modifyitems(items, config):
sat_version = settings.server.version.get('release')
snap_version = settings.server.version.get('snap', '')

# Satellite Network Type on which tests are running on
satellite_network_type = 'ipv6' if settings.server.is_ipv6 else 'ipv4'

# split the option string and handle no option, single option, multiple
# config.getoption(default) doesn't work like you think it does, hence or ''
importance = [i.lower() for i in (config.getoption('importance') or '').split(',') if i != '']
Expand Down Expand Up @@ -224,6 +227,9 @@ def pytest_collection_modifyitems(items, config):
item.user_properties.append(("SatelliteVersion", sat_version))
item.user_properties.append(("SnapVersion", snap_version))

# Network Type user property
item.user_properties.append(("SatelliteNetworkType", satellite_network_type))

# exit early if no filters were passed
if importance or component or team:
# Filter test collection based on CLI options for filtering
Expand Down

0 comments on commit d1f6ee1

Please sign in to comment.