Skip to content
Snippets Groups Projects
Commit e1df06f2 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add some trivial QA tests for the new OS states


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent d22dfef7
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
#
# Copyright (C) 2007 Google Inc.
# Copyright (C) 2007, 2008, 2009, 2010 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -145,6 +145,7 @@ def RunOsTests():
RunTest(qa_os.TestOsPartiallyValid)
RunTest(qa_os.TestOsModifyValid)
RunTest(qa_os.TestOsModifyInvalid)
RunTest(qa_os.TestOsStates)
def RunCommonInstanceTests(instance):
......
#
#
# Copyright (C) 2007 Google Inc.
# Copyright (C) 2007, 2008, 2009, 2010 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -75,6 +75,19 @@ def _TestOsModify(hvp_dict, expected_result=0):
utils.ShellQuoteArgs(cmd)).wait(), expected_result)
def _TestOsStates():
"""gnt-os modify, more stuff"""
master = qa_config.GetMasterNode()
cmd = ["gnt-os", "modify"]
for param in ["hidden", "blacklisted"]:
for val in ["yes", "no"]:
new_cmd = cmd + ["--%s" % param, val, _TEMP_OS_NAME]
AssertEqual(StartSSH(master["primary"],
utils.ShellQuoteArgs(new_cmd)).wait(), 0)
def _SetupTempOs(node, dir, valid):
"""Creates a temporary OS definition on the given node.
......@@ -181,3 +194,9 @@ def TestOsModifyInvalid():
}
return _TestOsModify(hv_dict, 1)
def TestOsStates():
"""Testing OS states"""
return _TestOsStates()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment