Merge "Make CLI timeout tests configurable"

This commit is contained in:
Jenkins
2013-08-06 22:31:29 +00:00
committed by Gerrit Code Review
4 changed files with 11 additions and 2 deletions

View File

@@ -365,6 +365,8 @@ large_ops_number = 0
enabled = True enabled = True
# directory where python client binaries are located # directory where python client binaries are located
cli_dir = /usr/local/bin cli_dir = /usr/local/bin
# Number of seconds to wait on a CLI timeout
timeout = 15
[service_available] [service_available]
# Whether or not cinder is expected to be available # Whether or not cinder is expected to be available

View File

@@ -35,6 +35,9 @@ cli_opts = [
cfg.StrOpt('cli_dir', cfg.StrOpt('cli_dir',
default='/usr/local/bin/', default='/usr/local/bin/',
help="directory where python client binaries are located"), help="directory where python client binaries are located"),
cfg.IntOpt('timeout',
default=15,
help="Number of seconds to wait on a CLI timeout"),
] ]
CONF = cfg.CONF CONF = cfg.CONF

View File

@@ -176,7 +176,7 @@ class SimpleReadOnlyNovaClientTest(tempest.cli.ClientTestBase):
self.nova('list', flags='--debug') self.nova('list', flags='--debug')
def test_admin_timeout(self): def test_admin_timeout(self):
self.nova('list', flags='--timeout 2') self.nova('list', flags='--timeout %d' % CONF.cli.timeout)
def test_admin_timing(self): def test_admin_timing(self):
self.nova('list', flags='--timing') self.nova('list', flags='--timing')

View File

@@ -18,9 +18,13 @@
import re import re
import subprocess import subprocess
from oslo.config import cfg
import tempest.cli import tempest.cli
from tempest.openstack.common import log as logging from tempest.openstack.common import log as logging
CONF = cfg.CONF
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@@ -117,4 +121,4 @@ class SimpleReadOnlyKeystoneClientTest(tempest.cli.ClientTestBase):
self.keystone('catalog', flags='--debug') self.keystone('catalog', flags='--debug')
def test_admin_timeout(self): def test_admin_timeout(self):
self.keystone('catalog', flags='--timeout 15') self.keystone('catalog', flags='--timeout %d' % CONF.cli.timeout)