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:
parent
945ac47507
commit
a539f306c1
|
@ -10,6 +10,8 @@
|
||||||
roles:
|
roles:
|
||||||
- zuul: openstack/devstack
|
- zuul: openstack/devstack
|
||||||
vars:
|
vars:
|
||||||
|
devstack_localrc:
|
||||||
|
USE_PYTHON3: true
|
||||||
devstack_plugins:
|
devstack_plugins:
|
||||||
rally-openstack: https://opendev.org/openstack/rally-openstack
|
rally-openstack: https://opendev.org/openstack/rally-openstack
|
||||||
run: tests/ci/playbooks/run-rally-verify.yaml
|
run: tests/ci/playbooks/run-rally-verify.yaml
|
||||||
|
|
|
@ -33,7 +33,7 @@ AVAILABLE_SETS = (list(consts.TempestTestSets) +
|
||||||
|
|
||||||
|
|
||||||
@manager.configure(name="tempest", platform="openstack",
|
@manager.configure(name="tempest", platform="openstack",
|
||||||
default_repo="https://git.openstack.org/openstack/tempest",
|
default_repo="https://opendev.org/openstack/tempest",
|
||||||
context={"tempest": {}, "testr": {}})
|
context={"tempest": {}, "testr": {}})
|
||||||
class TempestManager(testr.TestrLauncher):
|
class TempestManager(testr.TestrLauncher):
|
||||||
"""Tempest verifier.
|
"""Tempest verifier.
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
shell:
|
shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
cd {{ zuul.project.src_dir }}
|
cd {{ zuul.project.src_dir }}
|
||||||
python tests/ci/rally_verify.py
|
python3 tests/ci/rally_verify.py
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
|
@ -116,10 +116,12 @@ class Step(object):
|
||||||
def _write_file(cls, path, data, compress=False):
|
def _write_file(cls, path, data, compress=False):
|
||||||
"""Create a file and write some data to it."""
|
"""Create a file and write some data to it."""
|
||||||
if compress:
|
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)
|
f.write(data)
|
||||||
else:
|
else:
|
||||||
with open(path, "wb") as f:
|
with open(path, "w") as f:
|
||||||
f.write(data)
|
f.write(data)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
@ -129,7 +131,7 @@ class Step(object):
|
||||||
try:
|
try:
|
||||||
LOG.info("Start `%s` command." % command)
|
LOG.info("Start `%s` command." % command)
|
||||||
stdout = subprocess.check_output(command.split(),
|
stdout = subprocess.check_output(command.split(),
|
||||||
stderr=subprocess.STDOUT)
|
stderr=subprocess.STDOUT).decode()
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
LOG.error("Command `%s` failed." % command)
|
LOG.error("Command `%s` failed." % command)
|
||||||
return Status.ERROR, e.output
|
return Status.ERROR, e.output
|
||||||
|
@ -231,7 +233,7 @@ class CreateVerifier(Step):
|
||||||
DEPENDS_ON = ListPlugins
|
DEPENDS_ON = ListPlugins
|
||||||
CALL_ARGS = {"type": "tempest",
|
CALL_ARGS = {"type": "tempest",
|
||||||
"name": "my-verifier",
|
"name": "my-verifier",
|
||||||
"source": "https://git.openstack.org/openstack/tempest"}
|
"source": "https://opendev.org/openstack/tempest"}
|
||||||
|
|
||||||
|
|
||||||
class ShowVerifier(Step):
|
class ShowVerifier(Step):
|
||||||
|
@ -263,7 +265,7 @@ class UpdateVerifier(Step):
|
||||||
# Get the penultimate verifier commit ID
|
# Get the penultimate verifier commit ID
|
||||||
p_commit_id = subprocess.check_output(
|
p_commit_id = subprocess.check_output(
|
||||||
["git", "log", "-n", "1", "--pretty=format:%H"],
|
["git", "log", "-n", "1", "--pretty=format:%H"],
|
||||||
cwd=verifications_dir).strip()
|
cwd=verifications_dir).decode().strip()
|
||||||
self.CALL_ARGS = {"version": p_commit_id}
|
self.CALL_ARGS = {"version": p_commit_id}
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,7 +281,7 @@ class ExtendVerifier(Step):
|
||||||
|
|
||||||
COMMAND = "verify add-verifier-ext --source %(source)s"
|
COMMAND = "verify add-verifier-ext --source %(source)s"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
CALL_ARGS = {"source": "https://git.openstack.org/openstack/"
|
CALL_ARGS = {"source": "https://opendev.org/openstack/"
|
||||||
"keystone-tempest-plugin"}
|
"keystone-tempest-plugin"}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,8 @@ class ExistingPlatformTestCase(PlatformBaseTestCase):
|
||||||
[mock.call(pdata["admin"]), mock.call().verified_keystone(),
|
[mock.call(pdata["admin"]), mock.call().verified_keystone(),
|
||||||
mock.call().fakeclient.choose_version(),
|
mock.call().fakeclient.choose_version(),
|
||||||
mock.call().fakeclient.validate_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.call().fakeclient.create_client()])
|
||||||
|
|
||||||
@mock.patch("rally_openstack.osclients.Clients")
|
@mock.patch("rally_openstack.osclients.Clients")
|
||||||
|
|
|
@ -125,6 +125,7 @@ semantic-version===2.6.0
|
||||||
setuptools===40.4.3
|
setuptools===40.4.3
|
||||||
simplejson===3.16.0
|
simplejson===3.16.0
|
||||||
six===1.11.0
|
six===1.11.0
|
||||||
|
Sphinx==1.8.5;python_version=='2.7'
|
||||||
SQLAlchemy===1.2.12
|
SQLAlchemy===1.2.12
|
||||||
sqlalchemy-migrate===0.11.0
|
sqlalchemy-migrate===0.11.0
|
||||||
sqlparse===0.2.4
|
sqlparse===0.2.4
|
||||||
|
|
Loading…
Reference in New Issue