diff --git a/testing/ganeti.qa.py b/testing/ganeti.qa.py index 2f585b9f3ea80a278cd17f3809514ad30f2b9933..873e4684ad144c548aa5675fba7ef71d83a8e578 100755 --- a/testing/ganeti.qa.py +++ b/testing/ganeti.qa.py @@ -255,7 +255,7 @@ def TestGanetiCommands(): ['ganeti-noded', '--version'], ['ganeti-watcher', '--version'] ) - cmd = ' && '.join(map(utils.ShellQuoteArgs, cmds)) + cmd = ' && '.join([utils.ShellQuoteArgs(i) for i in cmds]) for node in cfg['nodes']: AssertEqual(StartSSH(node['primary'], cmd).wait(), 0) @@ -273,7 +273,7 @@ def TestIcmpPing(): check.append(i['secondary']) ping = lambda ip: utils.ShellQuoteArgs(['ping', '-w', '3', '-c', '1', ip]) - cmd = ' && '.join(map(ping, check)) + cmd = ' && '.join([ping(i) for i in check]) AssertEqual(StartSSH(node['primary'], cmd).wait(), 0) # }}} @@ -288,6 +288,7 @@ def TestClusterInit(): cmd.append('--secondary-ip=%s' % master['secondary']) if cfg.get('bridge', None): cmd.append('--bridge=%s' % cfg['bridge']) + cmd.append('--master-netdev=%s' % cfg['bridge']) cmd.append(cfg['name']) AssertEqual(StartSSH(master['primary'], @@ -328,7 +329,7 @@ def TestClusterBurnin(): script = UploadFile(master['primary'], '../tools/burnin') try: cmd = [script, '--os=%s' % cfg['os']] - cmd += map(lambda inst: inst['name'], instances) + cmd += [inst['name'] for inst in instances] AssertEqual(StartSSH(master['primary'], utils.ShellQuoteArgs(cmd)).wait(), 0) finally: @@ -400,6 +401,13 @@ def TestNodeRemoveAll(): for node in cfg['nodes']: if node != master: _NodeRemove(node) + + +def TestNodeInfo(): + """gnt-node info""" + cmd = ['gnt-node', 'info'] + AssertEqual(StartSSH(GetMasterNode()['primary'], + utils.ShellQuoteArgs(cmd)).wait(), 0) # }}} # {{{ Instance tests @@ -464,6 +472,13 @@ def TestInstanceFailover(instance): cmd = ['gnt-instance', 'failover', '--force', instance['name']] AssertEqual(StartSSH(GetMasterNode()['primary'], utils.ShellQuoteArgs(cmd)).wait(), 0) + + +def TestInstanceInfo(instance): + """gnt-instance info""" + cmd = ['gnt-instance', 'info', instance['name']] + AssertEqual(StartSSH(GetMasterNode()['primary'], + utils.ShellQuoteArgs(cmd)).wait(), 0) # }}} # {{{ Daemon tests @@ -633,10 +648,15 @@ if __name__ == '__main__': if TestEnabled('cluster-verify'): RunTest(TestClusterVerify) + + if TestEnabled('cluster-info'): RunTest(TestClusterInfo) RunTest(TestNodeAddAll) + if TestEnabled('node-info'): + RunTest(TestNodeInfo) + if TestEnabled('cluster-burnin'): RunTest(TestClusterBurnin) @@ -650,6 +670,9 @@ if __name__ == '__main__': RunTest(TestInstanceShutdown, instance) RunTest(TestInstanceStartup, instance) + if TestEnabled('instance-info'): + RunTest(TestInstanceInfo, instance) + if TestEnabled('instance-automatic-restart'): RunTest(TestInstanceAutomaticRestart, node, instance) @@ -663,6 +686,10 @@ if __name__ == '__main__': instance = RunTest(TestInstanceAddWithLocalMirrorDisk, node) RunTest(TestInstanceShutdown, instance) RunTest(TestInstanceStartup, instance) + + if TestEnabled('instance-info'): + RunTest(TestInstanceInfo, instance) + RunTest(TestInstanceRemove, instance) del instance @@ -673,6 +700,9 @@ if __name__ == '__main__': RunTest(TestInstanceShutdown, instance) RunTest(TestInstanceStartup, instance) + if TestEnabled('instance-info'): + RunTest(TestInstanceInfo, instance) + if TestEnabled('instance-failover'): RunTest(TestInstanceFailover, instance)