Merge "Refactor configuration tests"

This commit is contained in:
Jenkins 2015-07-15 18:07:43 +00:00 committed by Gerrit Code Review
commit 5b5ec07f15
2 changed files with 8 additions and 10 deletions

View File

@ -88,7 +88,11 @@ MasterGroup = [
default='root'), default='root'),
cfg.StrOpt('master_node_ssh_password', cfg.StrOpt('master_node_ssh_password',
default='r00tme', default='r00tme',
help='ssh user pass of master node') help='ssh user pass of master node'),
cfg.IntOpt('ssh_timeout',
default=50,
help="Timeout in seconds to wait for authentication to "
"succeed."),
] ]

View File

@ -36,12 +36,6 @@ class SanityConfigurationTest(nmanager.SanityChecksTest):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super(SanityConfigurationTest, cls).setUpClass() super(SanityConfigurationTest, cls).setUpClass()
cls.controllers = cls.config.compute.online_controllers
cls.computes = cls.config.compute.online_computes
cls.usr = cls.config.compute.controller_node_ssh_user
cls.pwd = cls.config.compute.controller_node_ssh_password
cls.key = cls.config.compute.path_to_private_key
cls.timeout = cls.config.compute.ssh_timeout
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
@ -58,9 +52,9 @@ class SanityConfigurationTest(nmanager.SanityChecksTest):
""" """
ssh_client = SSHClient('localhost', ssh_client = SSHClient('localhost',
self.usr, self.config.master.master_node_ssh_user,
self.pwd, self.config.master.master_node_ssh_password,
timeout=self.timeout) timeout=self.config.master.ssh_timeout)
cmd = "date" cmd = "date"
output = [] output = []
try: try: