Skip to content

Commit

Permalink
[6.15.z] automation coverage for SAT-28695 (#17082)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Dec 5, 2024
1 parent 182b296 commit 3c63b8f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/foreman/cli/test_rhcloud_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,37 @@ def test_positive_generate_all_reports_job(target_sat):
assert task_output[0].result == "success"
finally:
target_sat.update_setting('allow_auto_inventory_upload', True)


@pytest.mark.rhel_ver_match('N-2')
def test_positive_register_insights_client_host(module_target_sat, rhel_insights_vm):
"""Check the below command executed successfully
command - insights-client --ansible-host=foo.example.com
:id: b578371e-ec36-42de-83fa-bcea6e027fe2
:setup:
1. Enable, sync RHEL BaseOS and AppStream repositories
2. Create CV, Publish/promote and create AK for host registration
3. Register host to satellite, Setup Insights is Yes (Override), Install insights-client
:steps:
2. Test connection of insights client
3. execute insight client command given in the description
:expectedresults: Command executed successfully
:Verifies: SAT-28695
:customerscenario: true
:CaseAutomation: Automated
"""
# Test connection of insights client
assert rhel_insights_vm.execute('insights-client --test-connection').status == 0

# Execute insight client command
output = rhel_insights_vm.execute(f'insights-client --ansible-host={rhel_insights_vm.hostname}')
assert output.status == 0
assert 'Ansible hostname updated' in output.stdout

0 comments on commit 3c63b8f

Please sign in to comment.