Skip to content

Commit

Permalink
Get tox tests running without any extras
Browse files Browse the repository at this point in the history
We need to remove aci dependencies from the requirements, as with them
present we cannot run the tests and they are not published by Cisco.

We also need to pin the pip version, as at the time of this writing URL
dependencies are not supported. When they will be supported by a current
release this can be removed again. See pypa/pip#8253
  • Loading branch information
sebageek committed Apr 20, 2021
1 parent 8918c04 commit 2d6b85e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c {env:UPPER_CONSTRAINTS_FILE:https://raw.githubusercontent.com/sapcc/requirements/stable/ussuri-m3/upper-constraints.txt} -r requirements.txt -r test-requirements.txt -U {opts} {packages}
# pip 20.2.3 is used until constraints as urls are reintroduced in pip
# see https://github.com/pypa/pip/issues/8253 or PR 9673 (currently merged, not released)
setenv = VIRTUAL_ENV={envdir}
VIRTUALENV_PIP=20.2.3
PYTHONWARNINGS=default::DeprecationWarning
deps = -r{toxinidir}/test-requirements.txt
-e{env:NEUTRON_SOURCE:git+https://github.com/sapcc/neutron.git@stable/ussuri-m3#egg=neutron}
whitelist_externals = sh

# remove aci dependencies from requirements, as Cisco does not put them on pypi nor
# is there another easy way for them to be publicly installed without owning an APIC
run_before = sed -nri '/^aci(cobra|model)/!p' requirements.txt

commands = python setup.py testr --slowest --testr-args='{posargs}'

[testenv:pep8]
Expand Down

0 comments on commit 2d6b85e

Please sign in to comment.