
An addition has been proposed to leverage Gerrit's "Cc" feature, but in order to test this we need a newer version of the server. Newer Gerrit versions require HTTP basic auth instead of digest for the REST API, so switch our tests to use that when uploading SSH keys. A newer JDK (11) is required, but this version should still be available on our configured test platforms. We update the test Gerrit server config to not try to send email. This prevents annoying tracebacks from ending up in the Gerrit logs on test failures. We update test_cloned_repo and test_multiple_changes to look for strings that newer Gerrit emits on successful push. Git review passes these through to users and the tests look for them to determine if pushes were successful. Because of an SSH host key negotiation regression in 3.4.5, stick with 3.4.4 for now: https://bugs.chromium.org/p/gerrit/issues/detail?id=16215 Finally we remove skipsdist from tox.ini so that `which git-review` can find git-review installed to the test venv. Tox v4 won't install the project into the venv if skipsdist is set. Change-Id: I540950b93356b1efbc34bca976bfb3134f47a599
43 lines
1.0 KiB
INI
43 lines
1.0 KiB
INI
[tox]
|
|
envlist = linters,docs,py3
|
|
ignore_basepython_conflict = true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = true
|
|
# See "testing behind a proxy" https://review.opendev.org/624496
|
|
passenv =
|
|
http_proxy
|
|
https_proxy
|
|
# avoids potential slip-over of java 1.9 which breaks Gerrit, without it
|
|
# Gerrit may start with incompatible java version.
|
|
JAVA_HOME
|
|
# uncomment to allow custom java options to be added
|
|
# _JAVA_OPTIONS
|
|
TERM
|
|
commands =
|
|
python -m git_review.tests.check_test_id_hashes discover --list
|
|
python -m git_review.tests.prepare
|
|
stestr run --color {posargs}
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:linters]
|
|
commands = flake8
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
ignore = E125,H202,H405,H904,W504
|
|
show-source = true
|
|
exclude = .venv,.git,.tox,dist,doc,releasenotes,*lib/python*,*egg,build
|