Enable py39 tox gate/test for app plugins
Add support for tox testing under Debian Bullseye by enabling a python 3.9 gate and tox target for exercising plugin unit tests. Story: 2009101 Task: 43188 Signed-off-by: Charles Short <charles.short@windriver.com> Change-Id: Ie7f0f4efd809fafb95a14274c400e7cb2f8458b9
This commit is contained in:
parent
c6c16c0682
commit
75694acecc
21
.zuul.yaml
21
.zuul.yaml
@ -3,13 +3,32 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
|
- k8app-snmp-armada-tox-py39
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
|
- k8app-snmp-armada-tox-py39
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- stx-snmp-armada-app-upload-git-mirror
|
- stx-snmp-armada-app-upload-git-mirror
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: k8app-snmp-armada-tox-py39
|
||||||
|
parent: tox-py39
|
||||||
|
description: |
|
||||||
|
Run py39 test for k8app-snmp-armada-app
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
required-projects:
|
||||||
|
- starlingx/config
|
||||||
|
- starlingx/fault
|
||||||
|
- starlingx/update
|
||||||
|
- starlingx/utilities
|
||||||
|
files:
|
||||||
|
- python-k8sapp-snmp/k8sapp_snmp/*
|
||||||
|
vars:
|
||||||
|
tox_envlist: py39
|
||||||
|
python_version: 3.9
|
||||||
|
tox_extra_args: python-k8sapp-snmp/k8sapp_snmp/tox.ini
|
||||||
- job:
|
- job:
|
||||||
name: stx-snmp-armada-app-upload-git-mirror
|
name: stx-snmp-armada-app-upload-git-mirror
|
||||||
parent: upload-git-mirror
|
parent: upload-git-mirror
|
||||||
@ -100,4 +119,4 @@
|
|||||||
Zbi+hbm/Cfzd8/hCnIQbG7LSi0kAiNSgM9pcU2J3qcivIL7ArpjOrYR+qTa4BraGcqumM
|
Zbi+hbm/Cfzd8/hCnIQbG7LSi0kAiNSgM9pcU2J3qcivIL7ArpjOrYR+qTa4BraGcqumM
|
||||||
oCrQPmkGGbtEjqD1r7GUHUaUUU2EnCv+qfXF2+GqV3VruRP0X/WWbLmfKYjLgDn3tY5nM
|
oCrQPmkGGbtEjqD1r7GUHUaUUU2EnCv+qfXF2+GqV3VruRP0X/WWbLmfKYjLgDn3tY5nM
|
||||||
PFo3bmC7D9aU2vHRefTIu0XPpg7VqGTaPIPngkpp71rwlc8s+Kskt/it3o6ZtQNsSna5+
|
PFo3bmC7D9aU2vHRefTIu0XPpg7VqGTaPIPngkpp71rwlc8s+Kskt/it3o6ZtQNsSna5+
|
||||||
YrbCChy6nCnzWhPeNtAGlRzfSkMYJig98fgEC6wgOexmN6cUYGR7Q0pt/o0Ct0=
|
YrbCChy6nCnzWhPeNtAGlRzfSkMYJig98fgEC6wgOexmN6cUYGR7Q0pt/o0Ct0=
|
||||||
|
10
bindep.txt
Normal file
10
bindep.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# This is a cross-platform list tracking distribution packages needed for install and tests;
|
||||||
|
# see https://docs.openstack.org/infra/bindep/ for additional information.
|
||||||
|
|
||||||
|
libffi-dev [platform:dpkg]
|
||||||
|
libldap2-dev [platform:dpkg]
|
||||||
|
libxml2-dev [platform:dpkg]
|
||||||
|
libxslt1-dev [platform:dpkg]
|
||||||
|
libsasl2-dev [platform:dpkg]
|
||||||
|
libffi-devel [platform:rpm]
|
||||||
|
python3-all-dev [platform:dpkg]
|
@ -1,4 +1,4 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
test_path=./k8sapp_cert_manager/tests
|
test_path=./k8sapp_snmp/tests
|
||||||
top_dir=./k8sapp_cert_manager
|
top_dir=./k8sapp_snmp
|
||||||
#parallel_class=True
|
#parallel_class=True
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import mock
|
||||||
|
|
||||||
|
from k8sapp_snmp.helm.snmp import SnmpHelm
|
||||||
|
|
||||||
from sysinv.common import constants
|
from sysinv.common import constants
|
||||||
from sysinv.tests.db import base as dbbase
|
from sysinv.tests.db import base as dbbase
|
||||||
from sysinv.tests.helm.test_helm import HelmOperatorTestSuiteMixin
|
from sysinv.tests.helm.test_helm import HelmOperatorTestSuiteMixin
|
||||||
@ -15,6 +19,10 @@ class K8SAppSnmpAppMixin(object):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(K8SAppSnmpAppMixin, self).setUp()
|
super(K8SAppSnmpAppMixin, self).setUp()
|
||||||
|
get_db_connection = mock.patch.object(SnmpHelm,
|
||||||
|
'_get_database_connection')
|
||||||
|
self.mock_save_overrides = get_db_connection.start()
|
||||||
|
self.addCleanup(get_db_connection.stop)
|
||||||
|
|
||||||
|
|
||||||
# Test Configuration:
|
# Test Configuration:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = flake8,py27,py36,pylint,bandit
|
envlist = flake8,py27,py36,py39,pylint,bandit
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
# skipsdist = True
|
# skipsdist = True
|
||||||
#,pip-missing-reqs
|
#,pip-missing-reqs
|
||||||
@ -14,15 +14,15 @@ distshare={toxworkdir}/.tox/distshare
|
|||||||
# enabling usedevelop results in py27 develop-inst:
|
# enabling usedevelop results in py27 develop-inst:
|
||||||
# Exception: Versioning for this project requires either an sdist tarball,
|
# Exception: Versioning for this project requires either an sdist tarball,
|
||||||
# or access to an upstream git repository.
|
# or access to an upstream git repository.
|
||||||
# Note. site-packages is true and rpm-python must be yum installed on your dev machine.
|
# Note. site-packages is false and rpm-python must be yum installed on your dev machine.
|
||||||
sitepackages = True
|
sitepackages = False
|
||||||
|
|
||||||
# tox is silly... these need to be separated by a newline....
|
# tox is silly... these need to be separated by a newline....
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
find
|
find
|
||||||
|
|
||||||
install_command = pip install \
|
install_command = pip install \
|
||||||
-v -v -v \
|
-v -v -v --use-deprecated legacy-resolver \
|
||||||
-c{toxinidir}/upper-constraints.txt \
|
-c{toxinidir}/upper-constraints.txt \
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
||||||
{opts} {packages}
|
{opts} {packages}
|
||||||
@ -79,6 +79,18 @@ commands =
|
|||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
|
[testenv:py39]
|
||||||
|
basepython = python3.9
|
||||||
|
install_command = pip install \
|
||||||
|
-v -v -v --use-deprecated legacy-resolver \
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
|
{opts} {packages}
|
||||||
|
commands =
|
||||||
|
{[testenv]commands}
|
||||||
|
stestr run {posargs}
|
||||||
|
stestr slowest
|
||||||
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
# testenv:flake8 clone
|
# testenv:flake8 clone
|
||||||
basepython = {[testenv:flake8]basepython}
|
basepython = {[testenv:flake8]basepython}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user