Make CLI timeout tests configurable
Add an option for configuring the timeout used in the compute and keystone CLI tests. Closes-Bug: #1208846 Change-Id: Ia8f2fe528da7c6f294a1047d1d8b84239ce17adc
This commit is contained in:
@@ -365,6 +365,8 @@ large_ops_number = 0
|
||||
enabled = True
|
||||
# directory where python client binaries are located
|
||||
cli_dir = /usr/local/bin
|
||||
# Number of seconds to wait on a CLI timeout
|
||||
timeout = 15
|
||||
|
||||
[service_available]
|
||||
# Whether or not cinder is expected to be available
|
||||
|
||||
@@ -35,6 +35,9 @@ cli_opts = [
|
||||
cfg.StrOpt('cli_dir',
|
||||
default='/usr/local/bin/',
|
||||
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
|
||||
|
||||
@@ -176,7 +176,7 @@ class SimpleReadOnlyNovaClientTest(tempest.cli.ClientTestBase):
|
||||
self.nova('list', flags='--debug')
|
||||
|
||||
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):
|
||||
self.nova('list', flags='--timing')
|
||||
|
||||
@@ -18,9 +18,13 @@
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
import tempest.cli
|
||||
from tempest.openstack.common import log as logging
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@@ -117,4 +121,4 @@ class SimpleReadOnlyKeystoneClientTest(tempest.cli.ClientTestBase):
|
||||
self.keystone('catalog', flags='--debug')
|
||||
|
||||
def test_admin_timeout(self):
|
||||
self.keystone('catalog', flags='--timeout 15')
|
||||
self.keystone('catalog', flags='--timeout %d' % CONF.cli.timeout)
|
||||
|
||||
Reference in New Issue
Block a user