diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-03-22 13:13:53 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-03-23 19:08:26 +0100 |
commit | 37836c55a59f7c056d342d5744056950edfa0ded (patch) | |
tree | e7d72b696571ddf5c06a174dace7d5b16eae816b /functest | |
parent | 956cabd76a192522e9d63da8b39269a1e5650d1a (diff) |
Doesn't redirect stderr when getting verifier id
The logic fails when rally produces warnings [1].
It also updates Rally OpenStack and checks if the previous error
has been solved[2].
TypeError: _discover_or_create_flavor() missing 1 required positional
argument: 'flv_disk' [3]
[1] https://build.opnfv.org/ci/job/functest-opnfv-functest-healthcheck-latest-tempest_smoke-run/757/console
[2] https://github.com/openstack/rally-openstack/commit/e62315115af20e53f6c7205494ba0008634047ed
[3] https://build.opnfv.org/ci/job/functest-opnfv-functest-healthcheck-latest-tempest_smoke-run/629/console
Change-Id: Ia1daaa76d7cef7f30904c1f3bd42e2f6a6ba10af
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 62f33836dfb2d24650ec7474d532e304d5d537f6)
Diffstat (limited to 'functest')
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 6269540ec..f6b912a60 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -21,6 +21,7 @@ import subprocess import time import pkg_resources +import six from six.moves import configparser from xtesting.core import testcase import yaml @@ -199,9 +200,16 @@ class TempestCommon(singlevm.VmReady2): cmd = ("rally verify list-verifiers | awk '/" + getattr(config.CONF, 'tempest_verifier_name') + "/ {print $2}'") - proc = subprocess.Popen(cmd, shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) + if six.PY3: + # pylint: disable=no-member + proc = subprocess.Popen( + cmd, shell=True, stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL) + else: + with open(os.devnull, 'wb') as devnull: + proc = subprocess.Popen( + cmd, shell=True, stdout=subprocess.PIPE, + stderr=devnull) verifier_uuid = proc.stdout.readline().rstrip() return verifier_uuid.decode("utf-8") |