Skip to content

Commit

Permalink
Add negative test case for ipv6 enabled in boot options (#15062)
Browse files Browse the repository at this point in the history
Add negative test for ipv6 update check
  • Loading branch information
Griffin-Sullivan authored May 14, 2024
1 parent 00ce6d0 commit e4df53e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions robottelo/cli/sm_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Options:
-h, --help print help
"""

from robottelo.cli.base import Base


Expand Down
55 changes: 55 additions & 0 deletions tests/foreman/destructive/test_fm_upgrade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""Destructive test module for satellite-maintain upgrade functionality
:Requirement: foreman-maintain
:CaseAutomation: Automated
:CaseComponent: SatelliteMaintain
:Team: Platform
:CaseImportance: Critical
"""

import pytest

pytestmark = pytest.mark.destructive


@pytest.mark.include_capsule
def test_negative_ipv6_update_check(sat_maintain):
"""Ensure update check fails when ipv6.disable=1 in boot options
:id: 7b3e017f-443a-4204-99be-e39fa04c89f6
:parametrized: yes
:steps:
1. Add ipv6.disable to grub boot options
2. Reboot
3. Run update check
:customerscenario: true
:BZ: 2277393
:expectedresults: Update check fails due to ipv6.disable=1 in boot options
"""
result = sat_maintain.execute('grubby --args="ipv6.disable=1" --update-kernel=ALL')
assert result.status == 0

sat_maintain.power_control(state='reboot')

result = sat_maintain.cli.Update.check(
options={
'assumeyes': True,
'disable-self-update': True,
'whitelist': 'check-non-redhat-repository, repositories-validate',
}
)
assert result.status != 0
assert (
'The kernel contains ipv6.disable=1 which is known to break installation and upgrade, remove and reboot before continuining.'
in result.stdout
)

0 comments on commit e4df53e

Please sign in to comment.