-
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.
- Loading branch information
Showing
3 changed files
with
54 additions
and
4 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
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
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,50 @@ | ||
"""Test module for Remote Execution | ||
:Requirement: Remoteexecution | ||
:CaseAutomation: Automated | ||
:CaseComponent: RemoteExecution | ||
:Team: Endeavour | ||
:CaseImportance: High | ||
""" | ||
import pytest | ||
|
||
|
||
@pytest.mark.rhel_ver_list([9]) | ||
def test_positive_run_long_job(module_org, rex_contenthost, module_target_sat): | ||
"""Run a long running job | ||
:id: 76934868-89e6-4eb6-905e-d0d5ededc077 | ||
:expectedresults: Verify the long job was successfully ran and not terminated too soon | ||
:bz: 2270295 | ||
:parametrized: yes | ||
""" | ||
client = rex_contenthost | ||
invocation_command = module_target_sat.cli_factory.job_invocation( | ||
{ | ||
'job-template': 'Run Command - Script Default', | ||
'inputs': 'command=sleep 700', | ||
'search-query': f"name ~ {client.hostname}", | ||
}, | ||
timeout='800s', | ||
) | ||
result = module_target_sat.cli.JobInvocation.info({'id': invocation_command['id']}) | ||
try: | ||
assert result['success'] == '1' | ||
except AssertionError as err: | ||
raise AssertionError( | ||
'host output: {}'.format( | ||
' '.join( | ||
module_target_sat.cli.JobInvocation.get_output( | ||
{'id': invocation_command['id'], 'host': client.hostname} | ||
) | ||
) | ||
) | ||
) from err |