[verify ci] Fix various issues for `rally verify tempest`

1. try to fix encoding issue, need to decode Exception.output, otherwise
   cause an decode error while comparing with string.
2. Fix KeyError exception. to_html() would be raised an exception
   since some cases was skipped.
3. Update SQLAlchemy version in upper-constraints.txt

Change-Id: If4574456a07056670581e64c8bfc1672b733dfa8
This commit is contained in:
chenhb 2019-06-18 10:29:36 +08:00 committed by Andrey Kurilin
parent 8918b76bd2
commit 47ef72c7b5
2 changed files with 8 additions and 4 deletions

View File

@ -134,12 +134,15 @@ class Step(object):
stderr=subprocess.STDOUT).decode()
except subprocess.CalledProcessError as e:
LOG.error("Command `%s` failed." % command)
return Status.ERROR, e.output
return Status.ERROR, e.output.decode()
else:
return Status.PASS, stdout
def to_html(self):
return self.HTML_TEMPLATE % self.result
if self.result["status"] == Status.SKIPPED:
return ""
else:
return self.HTML_TEMPLATE % self.result
class SetUpStep(Step):
@ -386,6 +389,7 @@ class ReportVerificationMixin(Step):
self.CALL_ARGS["uuids"] = " ".join(
[v["uuid"] for v in self.rapi.verification.list()])
print(self.COMMAND % self.CALL_ARGS)
self.result["out"] = "<None>"
def run(self):
super(ReportVerificationMixin, self).run()

View File

@ -126,8 +126,8 @@ setuptools===40.4.3
simplejson===3.16.0
six===1.11.0
Sphinx==1.8.5;python_version=='2.7'
SQLAlchemy===1.2.12
sqlalchemy-migrate===0.11.0
SQLAlchemy===1.3.4
sqlalchemy-migrate===0.12.0
sqlparse===0.2.4
stevedore===1.29.0
subprocess32===3.5.2