From 47fb0f665fac057918aa04886283d5cc57dbcb91 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Fri, 30 May 2008 10:55:03 +0000 Subject: [PATCH] =?utf8?q?Add=20QA=20tests=20for=20=E2=80=9Cgnt-instance=20r?= =?utf8?q?eboot=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: ultrotter --- qa/ganeti-qa.py | 3 +++ qa/qa-sample.yaml | 1 + qa/qa_instance.py | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py index ab5c99d..f34339f 100755 --- a/qa/ganeti-qa.py +++ b/qa/ganeti-qa.py @@ -153,6 +153,9 @@ def RunCommonInstanceTests(instance): RunTest(qa_instance.TestInstanceReinstall, instance) RunTest(qa_instance.TestInstanceStartup, instance) + if qa_config.TestEnabled('instance-reboot'): + RunTest(qa_instance.TestInstanceReboot, instance) + if qa_config.TestEnabled('tags'): RunTest(qa_tags.TestInstanceTags, instance) diff --git a/qa/qa-sample.yaml b/qa/qa-sample.yaml index 39098a9..2f52d17 100644 --- a/qa/qa-sample.yaml +++ b/qa/qa-sample.yaml @@ -66,6 +66,7 @@ tests: instance-export: True instance-import: True instance-reinstall: True + instance-reboot: True instance-shutdown: True instance-automatic-restart: False instance-consecutive-failures: False diff --git a/qa/qa_instance.py b/qa/qa_instance.py index a0ed735..015ca4c 100644 --- a/qa/qa_instance.py +++ b/qa/qa_instance.py @@ -121,6 +121,18 @@ def TestInstanceShutdown(instance): utils.ShellQuoteArgs(cmd)).wait(), 0) +@qa_utils.DefineHook('instance-reboot') +def TestInstanceReboot(instance): + """gnt-instance reboot""" + master = qa_config.GetMasterNode() + + for reboottype in ["soft", "hard", "full"]: + cmd = ['gnt-instance', 'reboot', '--type=%s' % reboottype, + instance['name']] + AssertEqual(StartSSH(master['primary'], + utils.ShellQuoteArgs(cmd)).wait(), 0) + + @qa_utils.DefineHook('instance-reinstall') def TestInstanceReinstall(instance): """gnt-instance reinstall""" -- 1.7.10.4