def test_positive_foreman_maintain_service_restart(ansible_module): """Restart service using advanced procedure run :id: :setup: 1. foreman-maintain should be installed. :steps: 1. Run foreman-maintain advanced procedure run katello-service-restart :expectedresults: Katello-service should restart. :CaseImportance: Critical """ contacted = ansible_module.command(Advanced.run_katello_service_restart()) for result in contacted.values(): print(result['stdout']) assert "FAIL" not in result['stdout']
def advanced_procedure_run_service_restart(): """ Usage: foreman-maintain advanced procedure run katello-service-restart [OPTIONS] Options: --only ONLY A comma-separated list of services to include (comma-separated list) --exclude EXCLUDE A comma-separated list of services to skip (comma-separated list) -y, --assumeyes Automatically answer yes for all questions -w, --whitelist whitelist Comma-separated list of labels of steps to be ignored -f, --force Force steps that would be skipped as they were already run -h, --help print help """ return Advanced.run_katello_service_restart()