Enable tox tests for stx-distcloud
py27 tests fixed and passing py27 added to gate and check pep8 added to gate and check Story: 2003862 Task: 26691 Change-Id: I0469978534f9b50d33c65484f0b4c07b3314cb67 Signed-off-by: Lachlan Plant <lachlan.plant@windriver.com>
This commit is contained in:
parent
736b7c3779
commit
e815932fdb
15
.zuul.yaml
15
.zuul.yaml
|
@ -8,14 +8,29 @@
|
||||||
- build-openstack-releasenotes
|
- build-openstack-releasenotes
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
|
- stx-distcloud-tox-py27
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- build-openstack-api-ref
|
- build-openstack-api-ref
|
||||||
- build-openstack-releasenotes
|
- build-openstack-releasenotes
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
|
- stx-distcloud-tox-py27
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- publish-stx-api-ref
|
- publish-stx-api-ref
|
||||||
- publish-stx-tox
|
- publish-stx-tox
|
||||||
- publish-stx-releasenotes
|
- publish-stx-releasenotes
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-distcloud-tox-py27
|
||||||
|
parent: tox
|
||||||
|
description: Run py27 for distcloud
|
||||||
|
required-projects:
|
||||||
|
- openstack/stx-fault
|
||||||
|
- openstack/stx-nfv
|
||||||
|
- openstack/stx-update
|
||||||
|
- openstack/stx-config
|
||||||
|
vars:
|
||||||
|
tox_envlist: py27
|
||||||
|
tox_extra_args: -c tox.ini
|
||||||
|
|
|
@ -21,6 +21,9 @@ import mock
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
import sys
|
||||||
|
sys.modules['fm_core'] = mock.Mock()
|
||||||
|
|
||||||
from dcmanager.common import consts
|
from dcmanager.common import consts
|
||||||
from dcmanager.manager import patch_audit_manager
|
from dcmanager.manager import patch_audit_manager
|
||||||
from dcmanager.manager import subcloud_manager
|
from dcmanager.manager import subcloud_manager
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
import sys
|
||||||
|
sys.modules['fm_core'] = mock.Mock()
|
||||||
|
|
||||||
from dcmanager.manager import scheduler
|
from dcmanager.manager import scheduler
|
||||||
from dcmanager.manager import service
|
from dcmanager.manager import service
|
||||||
from dcmanager.tests import base
|
from dcmanager.tests import base
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
import sys
|
||||||
|
sys.modules['fm_core'] = mock.Mock()
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from dcmanager.manager import subcloud_audit_manager
|
from dcmanager.manager import subcloud_audit_manager
|
||||||
|
|
|
@ -22,6 +22,9 @@ import mock
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
|
import sys
|
||||||
|
sys.modules['fm_core'] = mock.Mock()
|
||||||
|
|
||||||
from dcorch.rpc import client as dcorch_rpc_client
|
from dcorch.rpc import client as dcorch_rpc_client
|
||||||
|
|
||||||
from dcmanager.common import consts
|
from dcmanager.common import consts
|
||||||
|
|
67
tox.ini
67
tox.ini
|
@ -1,8 +1,20 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = linters,pep8
|
envlist = linters,pep8,py27-dev
|
||||||
minversion = 2.3
|
minversion = 2.3
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
|
[dc]
|
||||||
|
dc_base_dir = .
|
||||||
|
|
||||||
|
stx_fault_dir = ../stx-fault
|
||||||
|
nfv_client_src_dir = ../stx-nfv/nfv/nfv-client
|
||||||
|
fmclient_src_dir = {[dc]stx_fault_dir}/python-fmclient/fmclient
|
||||||
|
fm_api_src_dir = {[dc]stx_fault_dir}/fm-api
|
||||||
|
sysinv_src_dir = ../stx-config/sysinv/sysinv/sysinv
|
||||||
|
tsconfig_src_dir = ../stx-update/tsconfig/tsconfig
|
||||||
|
configutilities_src_dir = ../stx-config/configutilities/configutilities
|
||||||
|
cgtsclient_src_dir = ../stx-config/sysinv/cgts-client/cgts-client
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||||||
|
@ -12,34 +24,55 @@ setenv =
|
||||||
OS_STDERR_CAPTURE=1
|
OS_STDERR_CAPTURE=1
|
||||||
OS_TEST_TIMEOUT=60
|
OS_TEST_TIMEOUT=60
|
||||||
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
||||||
# DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
|
||||||
|
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
#deps = keyring
|
-r{toxinidir}/requirements.txt
|
||||||
# -r{toxinidir}/requirements.txt
|
keyring
|
||||||
# -r{toxinidir}/test-requirements.txt
|
|
||||||
# -e{toxinidir}/../../middleware/config/recipes-common/tsconfig/tsconfig
|
|
||||||
# -e{toxinidir}/../../middleware/config/recipes-control/configutilities/configutilities
|
|
||||||
# -e{toxinidir}/../../middleware/sysinv/recipes-common/sysinv/sysinv
|
|
||||||
# -e{toxinidir}/../../middleware/fault/recipes-common/fm-api
|
|
||||||
# -e{toxinidir}/../../middleware/patching/recipes-common/cgcs-patch/cgcs-patch
|
|
||||||
# -e{toxinidir}/../../middleware/sysinv/recipes-common/cgts-client/cgts-client
|
|
||||||
# -e{toxinidir}/../../recipes-nfv/nfv/nfv-client
|
|
||||||
|
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
rm
|
rm
|
||||||
find
|
find
|
||||||
reno
|
reno
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27-dev]
|
||||||
basepython = python2.7
|
|
||||||
|
|
||||||
[testenv:py27-single]
|
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
keyring
|
||||||
|
-e../{[dc]nfv_client_src_dir}
|
||||||
|
-e../{[dc]sysinv_src_dir}
|
||||||
|
-e../{[dc]tsconfig_src_dir}
|
||||||
|
-e../{[dc]fmclient_src_dir}
|
||||||
|
-e../{[dc]fm_api_src_dir}
|
||||||
|
-e../{[dc]configutilities_src_dir}
|
||||||
|
-e../{[dc]cgtsclient_src_dir}
|
||||||
setenv =
|
setenv =
|
||||||
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
||||||
DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
DATA_DIRECTORY={toxinidir}/dcmanager/tests/data
|
||||||
SINGLE_REPO=True
|
SINGLE_REPO=True
|
||||||
|
commands =
|
||||||
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||||
|
python setup_ddt_tests.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:py27]
|
||||||
|
basepython = python2.7
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
keyring
|
||||||
|
-e{[dc]nfv_client_src_dir}
|
||||||
|
-e{[dc]sysinv_src_dir}
|
||||||
|
-e{[dc]tsconfig_src_dir}
|
||||||
|
-e{[dc]fmclient_src_dir}
|
||||||
|
-e{[dc]fm_api_src_dir}
|
||||||
|
-e{[dc]configutilities_src_dir}
|
||||||
|
-e{[dc]cgtsclient_src_dir}
|
||||||
|
setenv =
|
||||||
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
||||||
|
DATA_DIRECTORY={toxinidir}/dcmanager/tests/data
|
||||||
|
SINGLE_REPO=True
|
||||||
|
commands =
|
||||||
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||||
|
python setup_ddt_tests.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:debug-py27]
|
[testenv:debug-py27]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
|
|
Loading…
Reference in New Issue