Fix various issues

1. Specify Sphinx version while using Python2.7
2. Fix mock verification in test_check_health_with_api_info
3. Move rally-verify job under python3 env
4. Switch tempest verifier default source to opendev.org

Change-Id: I8f92ef87722d057514d0906d068ddaadd88c8758
This commit is contained in:
chenhb 2019-05-06 11:21:51 +08:00 committed by Andrey Kurilin
parent 945ac47507
commit a539f306c1
6 changed files with 15 additions and 9 deletions

View File

@ -10,6 +10,8 @@
roles:
- zuul: openstack/devstack
vars:
devstack_localrc:
USE_PYTHON3: true
devstack_plugins:
rally-openstack: https://opendev.org/openstack/rally-openstack
run: tests/ci/playbooks/run-rally-verify.yaml

View File

@ -33,7 +33,7 @@ AVAILABLE_SETS = (list(consts.TempestTestSets) +
@manager.configure(name="tempest", platform="openstack",
default_repo="https://git.openstack.org/openstack/tempest",
default_repo="https://opendev.org/openstack/tempest",
context={"tempest": {}, "testr": {}})
class TempestManager(testr.TestrLauncher):
"""Tempest verifier.

View File

@ -17,5 +17,5 @@
shell:
cmd: |
cd {{ zuul.project.src_dir }}
python tests/ci/rally_verify.py
python3 tests/ci/rally_verify.py
executable: /bin/bash

View File

@ -116,10 +116,12 @@ class Step(object):
def _write_file(cls, path, data, compress=False):
"""Create a file and write some data to it."""
if compress:
with gzip.open(path, "wb") as f:
with gzip.open(path, "w") as f:
if not isinstance(data, bytes):
data = data.encode()
f.write(data)
else:
with open(path, "wb") as f:
with open(path, "w") as f:
f.write(data)
return path
@ -129,7 +131,7 @@ class Step(object):
try:
LOG.info("Start `%s` command." % command)
stdout = subprocess.check_output(command.split(),
stderr=subprocess.STDOUT)
stderr=subprocess.STDOUT).decode()
except subprocess.CalledProcessError as e:
LOG.error("Command `%s` failed." % command)
return Status.ERROR, e.output
@ -231,7 +233,7 @@ class CreateVerifier(Step):
DEPENDS_ON = ListPlugins
CALL_ARGS = {"type": "tempest",
"name": "my-verifier",
"source": "https://git.openstack.org/openstack/tempest"}
"source": "https://opendev.org/openstack/tempest"}
class ShowVerifier(Step):
@ -263,7 +265,7 @@ class UpdateVerifier(Step):
# Get the penultimate verifier commit ID
p_commit_id = subprocess.check_output(
["git", "log", "-n", "1", "--pretty=format:%H"],
cwd=verifications_dir).strip()
cwd=verifications_dir).decode().strip()
self.CALL_ARGS = {"version": p_commit_id}
@ -279,7 +281,7 @@ class ExtendVerifier(Step):
COMMAND = "verify add-verifier-ext --source %(source)s"
DEPENDS_ON = CreateVerifier
CALL_ARGS = {"source": "https://git.openstack.org/openstack/"
CALL_ARGS = {"source": "https://opendev.org/openstack/"
"keystone-tempest-plugin"}

View File

@ -347,7 +347,8 @@ class ExistingPlatformTestCase(PlatformBaseTestCase):
[mock.call(pdata["admin"]), mock.call().verified_keystone(),
mock.call().fakeclient.choose_version(),
mock.call().fakeclient.validate_version(
mock.call().fakeclient.choose_version.return_value),
mock_clients.return_value.fakeclient.choose_version
.return_value),
mock.call().fakeclient.create_client()])
@mock.patch("rally_openstack.osclients.Clients")

View File

@ -125,6 +125,7 @@ semantic-version===2.6.0
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
sqlparse===0.2.4