Commit 074e139f authored by Michael Hanselmann's avatar Michael Hanselmann

QA: Rename OS state test for clarification

Also add an additional check to ensure the OS does not exist.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 80009a71
......@@ -188,7 +188,7 @@ def RunOsTests():
qa_os.TestOsPartiallyValid,
qa_os.TestOsModifyValid,
qa_os.TestOsModifyInvalid,
qa_os.TestOsStates,
qa_os.TestOsStatesNonExisting,
]:
RunTestIf("os", fn)
......
......@@ -68,13 +68,13 @@ def _TestOsModify(hvp_dict, fail=False):
AssertCommand(cmd, fail=fail)
def _TestOsStates():
def _TestOsStates(os_name):
"""gnt-os modify, more stuff"""
cmd = ["gnt-os", "modify"]
for param in ["hidden", "blacklisted"]:
for val in ["yes", "no"]:
new_cmd = cmd + ["--%s" % param, val, _TEMP_OS_NAME]
new_cmd = cmd + ["--%s" % param, val, os_name]
AssertCommand(new_cmd)
# check that double-running the command is OK
AssertCommand(new_cmd)
......@@ -179,7 +179,7 @@ def TestOsModifyInvalid():
return _TestOsModify(hv_dict, fail=True)
def TestOsStates():
"""Testing OS states"""
return _TestOsStates()
def TestOsStatesNonExisting():
"""Testing OS states with non-existing OS"""
AssertCommand(["test", "-e", _TEMP_OS_PATH], fail=True)
return _TestOsStates(_TEMP_OS_NAME)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment