Skip to content

Commit

Permalink
Assert no version available on satellite-maintain upgrade list-versio…
Browse files Browse the repository at this point in the history
…ns for stream (#12289)

Assert no version available on upgrade list-versions for stream
  • Loading branch information
Griffin-Sullivan authored Aug 21, 2023
1 parent eef7524 commit 8f03eaf
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/foreman/maintain/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
:Upstream: No
"""
import re

import pytest

from robottelo.config import settings
Expand Down Expand Up @@ -58,11 +60,19 @@ def test_positive_satellite_maintain_upgrade_list(sat_maintain):
else:
versions = ['Unsupported Satellite/Capsule version']

# Reboot if needed
if sat_maintain.execute('needs-restarting -r').status == 1:
sat_maintain.power_control(state='reboot')

result = sat_maintain.cli.Upgrade.list_versions()
assert result.status == 0
assert 'FAIL' not in result.stdout
for ver in versions:
assert ver in result.stdout
# If on stream, check there is no version listed
if sat_maintain.is_stream:
assert not bool(re.search(r'\d', result.stdout))
else:
for ver in versions:
assert ver in result.stdout


@pytest.mark.include_capsule
Expand Down

0 comments on commit 8f03eaf

Please sign in to comment.