aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally
diff options
context:
space:
mode:
authorCédric Ollivier <ollivier.cedric@gmail.com>2019-05-24 22:08:50 +0200
committerCédric Ollivier <ollivier.cedric@gmail.com>2019-05-24 22:08:50 +0200
commit7d58f89103a8c44fd166c3e06b492ade63e5c5b3 (patch)
tree03ae5a4963d22b257d3f978ee47169fd4020ae50 /functest/opnfv_tests/openstack/rally
parent383d5803c8440d31f8df4ecaf70b34a84971b73b (diff)
Decode Bytes in logging calls
It fixes a few incorrect types in log calls [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-latest-daily/163/ Change-Id: I01790f6454694f434d31366f9c1cf9d98ff5a9cf Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/rally')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 674c74252..08e4a36c1 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -191,18 +191,18 @@ class RallyBase(singlevm.VmReady2):
'--deployment',
str(getattr(config.CONF, 'rally_deployment_name'))]
output = subprocess.check_output(cmd)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
except subprocess.CalledProcessError:
pass
cmd = ['rally', 'deployment', 'create', '--fromenv',
'--name', str(getattr(config.CONF, 'rally_deployment_name'))]
output = subprocess.check_output(cmd, env=environ)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
cmd = ['rally', 'deployment', 'check']
output = subprocess.check_output(cmd)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
return RallyBase.get_verifier_deployment_id()
@staticmethod
@@ -399,7 +399,7 @@ class RallyBase(singlevm.VmReady2):
cmd = (["rally", "task", "detailed", "--uuid", task_id])
LOGGER.debug('running command: %s', cmd)
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
# save report as JSON
report_json_name = '{}.json'.format(test_name)
@@ -408,7 +408,7 @@ class RallyBase(singlevm.VmReady2):
"--out", report_json_dir])
LOGGER.debug('running command: %s', cmd)
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
json_results = open(report_json_dir).read()
self._append_summary(json_results, test_name)
@@ -608,7 +608,7 @@ class RallyBase(singlevm.VmReady2):
"--to", file_name]
LOGGER.debug('running command: %s', cmd)
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
@staticmethod
def verify_report(file_name, uuid, export_type="html"):
@@ -624,7 +624,7 @@ class RallyBase(singlevm.VmReady2):
"--uuid", uuid, "--to", file_name]
LOGGER.debug('running command: %s', cmd)
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
def clean(self):
"""Cleanup of OpenStack resources. Should be called on completion."""