def test_positive_foreman_maintain_health_list(ansible_module): """List health check in foreman-maintain :id: :setup: 1. foreman-maintain should be installed. :steps: 1. Run foreman-maintain health list :expectedresults: Health check list should work. :CaseImportance: Critical """ contacted = ansible_module.command(Health.list()) for result in contacted.values(): print(result['stdout']) assert result["rc"] == 0
def test_positive_list_health_check_by_tags(ansible_module): """List health check in foreman-maintain by tags :id: :setup: 1. foreman-maintain should be installed. :steps: 1. Run foreman-maintain health list --tags default :expectedresults: health checks according to tag should list. :CaseImportance: Critical """ for tags in ['default', 'pre-upgrade']: contacted = ansible_module.command(Health.list({'tags': tags})) for result in contacted.values(): print(result['stdout']) assert result["rc"] == 0