diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py index 4b784901eeb791f38eb1c1a9c82a72ea14b01b6c..070a1b34a6c26f9c912782703d4749c7a0ccfbb5 100755 --- a/qa/ganeti-qa.py +++ b/qa/ganeti-qa.py @@ -1,7 +1,7 @@ #!/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): diff --git a/qa/qa_os.py b/qa/qa_os.py index 28c2c73600ea09002fb0919d764035fb57c40fe6..143fedc53df3eb575659e9804daeabcd13767202 100644 --- a/qa/qa_os.py +++ b/qa/qa_os.py @@ -1,7 +1,7 @@ # # -# 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()