Compare commits

...

2 Commits

Author SHA1 Message Date
Anand Shanmugam
ef92966ecb Adding cli for listing all tests in all scenarios
Change-Id: I8543992099e0a5a858509f547ce9dffa42a1f608
(cherry picked from commit 53bb70e3f68a92829c2d9a60eb8063a2d5511373)
2016-04-20 21:22:16 +00:00
Anand Shanmugam
157284d26e Updating requirements.txt for stable/liberty
Change-Id: I4557051de31aa989d37999c1606b3976f902481b
(cherry picked from commit 068baf9792063a6d135a84b9abfc3c983f38e6c6)
2016-04-18 18:07:55 +00:00
6 changed files with 31 additions and 23 deletions

@ -186,14 +186,14 @@ def print_list(objs, fields, formatters=None, sortby_index=0,
print(encodeutils.safe_encode(pt.get_string(**kwargs)))
def print_dict(dct, dict_property="Property", wrap=0):
def print_dict(dct, dict_property="Property", dict_value="Value", wrap=0):
"""Print a `dict` as a table of two columns.
:param dct: `dict` to print
:param dict_property: name of the first column
:param wrap: wrapping for the second column
"""
pt = prettytable.PrettyTable([dict_property, 'Value'])
pt = prettytable.PrettyTable([dict_property, dict_value])
pt.align = 'l'
for k, v in six.iteritems(dct):
# convert dict to str to check length

@ -18,7 +18,14 @@ import six
from six.moves.urllib import parse
class HealthCheckTest(base.Resource):
def __repr__(self):
return str(self._info)
class HealthCheck(base.Resource):
def __repr__(self):
return "<Cpulse %s>" % self._info
@ -62,3 +69,6 @@ class HealthCheckManager(base.Manager):
return self._list(self._path(id))[0]
except IndexError:
return None
def get_test_list(self):
return self._list(self._path('list_tests'), obj_class=HealthCheckTest)

@ -44,15 +44,6 @@ def do_result(cs, args):
@utils.arg('name',
metavar='<name>',
help='Name of the healthcheck to run')
@utils.arg('--extension',
metavar='<extension>',
help='Name of the health check extension.')
@utils.arg('--test-args',
metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help='Arguments in key,value pair for the health check extension.')
@utils.arg('--args-file',
metavar='<FILE>',
help='Path to the file which is needed by the extension.')
def do_run(cs, args):
"""Run new test"""
opts = {}
@ -72,6 +63,13 @@ def do_show(cs, args):
utils.print_dict(healthcheck._info)
def do_test_list(cs, args):
"""Show a list of scenarios and tests in each scenario"""
healthcheck = cs.healthcheck.get_test_list()
utils.print_dict(
healthcheck[0]._info, dict_property="Scenarios", dict_value="Tests")
@utils.arg('cpulse',
metavar='<cpulse>',
nargs='+',

@ -1,14 +1,14 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=0.11,<2.0
pbr>=1.6
Babel>=1.3
oslo.config>=1.11.0 # Apache-2.0
oslo.i18n>=1.5.0 # Apache-2.0
oslo.utils>=1.4.0 # Apache-2.0
oslo.config>=2.3.0 # Apache-2.0
oslo.i18n>=1.5.0 # Apache-2.0`
oslo.utils>=2.0.0,!=2.6.0 # Apache-2.0
iso8601>=0.1.9
requests>=2.5.2
python-keystoneclient>=1.3.0
requests>=2.5.2,!=2.8.0,!=2.9.0
python-keystoneclient>=1.6.0,!=1.8.0
PyYAML>=3.1.0
stevedore>=1.3.0 # Apache-2.0
stevedore>=1.5.0 # Apache-2.0
six>=1.9.0

@ -2,14 +2,14 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking<0.11,>=0.10.0
hacking>=0.10.2,<0.11
coverage>=3.6
discover
python-subunit>=0.0.18
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx>=2.2.0 # Apache-2.0
oslotest>=1.2.0 # Apache-2.0
oslosphinx>=2.5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
testrepository>=0.0.18
testscenarios>=0.4
testtools>=0.9.36,!=1.2.0
testtools>=1.4.0

@ -5,7 +5,7 @@ skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt