Fix failing functional tests
Update tox.ini to support the new TEST_CONSTRAINTS_FILE Additionally pin netaddr in test-requirements.txt. The latest netaddr 1.2.1 release throws an error when passed None, which it previously didn't. This causes MonContextTest.test_ctxt_missing_data to error out. This should probably be fixed in charmhelpers later. Change-Id: I5bf8900c426395421c73ec3d52ebd691cc5496f8
This commit is contained in:
parent
913cb57b1f
commit
ebca1152ec
|
@ -1,7 +0,0 @@
|
|||
# NOTES(lourot):
|
||||
# * We don't install charmcraft via pip anymore because it anyway spins up a
|
||||
# container and scp the system's charmcraft snap inside it. So the charmcraft
|
||||
# snap is necessary on the system anyway.
|
||||
# * `tox -e build` successfully validated with charmcraft 1.2.1
|
||||
|
||||
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
|
|
@ -22,6 +22,9 @@ pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm
|
|||
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
|
||||
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
|
||||
|
||||
# netaddr is pinned in requirements.txt, but temptest below sometimes pulls in a newer version
|
||||
netaddr>0.7.16,<0.8.0
|
||||
|
||||
# Needed for charm-glance:
|
||||
git+https://opendev.org/openstack/tempest.git#egg=tempest
|
||||
|
||||
|
|
30
tox.ini
30
tox.ini
|
@ -32,11 +32,13 @@ passenv =
|
|||
CS_*
|
||||
OS_*
|
||||
TEST_*
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
deps =
|
||||
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:build]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/build-requirements.txt
|
||||
deps =
|
||||
# charmcraft clean is done to ensure that
|
||||
# `tox -e build` always performs a clean, repeatable build.
|
||||
# For faster rebuilds during development,
|
||||
|
@ -49,18 +51,24 @@ commands =
|
|||
|
||||
[testenv:py310]
|
||||
basepython = python3.10
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
deps =
|
||||
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py3]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
deps =
|
||||
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
deps = flake8==3.9.2
|
||||
git+https://github.com/juju/charm-tools.git
|
||||
deps =
|
||||
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
|
||||
flake8==3.9.2
|
||||
git+https://github.com/juju/charm-tools.git
|
||||
commands = flake8 {posargs} hooks unit_tests tests actions lib files
|
||||
charm-proof
|
||||
|
||||
|
@ -68,8 +76,10 @@ commands = flake8 {posargs} hooks unit_tests tests actions lib files
|
|||
# Technique based heavily upon
|
||||
# https://github.com/openstack/nova/blob/master/tox.ini
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
deps =
|
||||
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run
|
||||
|
|
Loading…
Reference in New Issue