-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add negative test case for ipv6 enabled in boot options (#15062)
Add negative test for ipv6 update check
- Loading branch information
1 parent
00ce6d0
commit e4df53e
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
Options: | ||
-h, --help print help | ||
""" | ||
|
||
from robottelo.cli.base import Base | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) |