| ############################################################################ | |
| # Copyright (C) SchedMD LLC. | |
| ############################################################################ | |
| import re | |
| import atf | |
| def test_usage(): | |
| """Verify sacctmgr --usage displays the help page""" | |
| output = atf.run_command_output("sacctmgr --usage", fatal=True) | |
| assert re.search(r"sacctmgr \[<OPTION>\] \[<COMMAND>\]", output) is not None | |
| assert re.search(r"Valid <OPTION> values are:", output) is not None | |
| assert re.search(r"Valid <COMMAND> values are:", output) is not None | |
| assert re.search(r"<ENTITY> may be", output) is not None | |
| assert ( | |
| re.search(r"<SPECS> are different for each command entity pair", output) | |
| is not None | |
| ) | |
| assert re.search(r"add account", output) is not None | |
| assert re.search(r"list associations", output) is not None | |
| assert re.search(r"modify cluster", output) is not None | |
| assert re.search(r"delete qos", output) is not None |