Replace nose

nose has been unmaintained for long time. Replace it by stestr, which
is now commonly used.

Also bump etcd to the version currently used in devstack and tooz.

Change-Id: Id6ac7d3e82eb2931c1fc63aac5be9eb62a361703
This commit is contained in:
Takashi Kajinami committed 2024-12-08 23:22:36 +09:00
1 parent 713d4f5d5f
commit cd9628a760
8 files changed
+32 -40

No files matched your search

+3 -4
View File
@@ -1,10 +1,9 @@
[run]
branch = True
source =
etcdgw
source = etcd3gw
omit =
/*/tests/*
/*/examples/*
etcd3gw/tests/*
etcd3gw/examples/*
[report]
ignore_errors = True
+2 -3
View File
@@ -25,9 +25,8 @@ pip-log.txt
cover/
.coverage*
!.coveragerc
.stestr
.tox
nosetests.xml
.testrepository
.venv
# Translations
@@ -58,4 +57,4 @@ ChangeLog
etcd-v*
# Files created by releasenotes build
releasenotes/build
releasenotes/build
+2
View File
@@ -0,0 +1,2 @@
[DEFAULT]
test_path=etcd3gw
-7
View File
@@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
+1 -1
View File
@@ -45,7 +45,7 @@ def _is_etcd3_running():
class TestEtcd3Gateway(base.TestCase):
@classmethod
def setUpClass(cls):
cls.client = Etcd3Client(api_path='/v3/')
cls.client = Etcd3Client(api_path='/v3beta/')
@unittest.skipUnless(
_is_etcd3_running(), "etcd3 is not available")
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
set -eux
if [ -z "$(which etcd)" ]; then
ETCD_VERSION=3.1.10
ETCD_VERSION=3.3.27
case `uname -s` in
Darwin)
OS=darwin
+1 -6
View File
@@ -1,10 +1,5 @@
coverage>=4.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
oslotest>=1.10.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
pifpaf>=0.10.0 # Apache-2.0
nose>=1.3.7 # GNU LGPL
pytest>=3.0.0 # MIT
stestr>=2.0.0 # Apache-2.0
urllib3>=1.15.1 # MIT
+22 -18
View File
@@ -7,7 +7,11 @@ usedevelop = True
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = py.test -vv {posargs}
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
allowlist_externals =
find
[testenv:pep8]
deps =
@@ -19,33 +23,33 @@ commands =
commands = {posargs}
[testenv:cover]
deps = {[testenv]deps}
setenv =
PYTHON=coverage run --source etcd3gw --parallel-mode
commands =
coverage erase
python setup.py test --coverage --testr-args='{posargs}'
[testenv:codecov]
deps = {[testenv]deps}
codecov>=1.4.0
commands =
{toxinidir}/setup-etcd-env.sh pifpaf -g TOOZ_TEST run etcd -- nosetests --with-coverage --cover-package=etcd3gw --cover-tests
codecov
{toxinidir}/setup-etcd-env.sh pifpaf run etcd -- stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --show-missing
allowlist_externals =
{toxinidir}/setup-etcd-env.sh
[testenv:docs]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pypy-etcd]
commands = {toxinidir}/setup-etcd-env.sh pifpaf -g TOOZ_TEST run etcd -- py.test -vv '{posargs}'
[testenv:py39-etcd]
commands = {toxinidir}/setup-etcd-env.sh pifpaf -g TOOZ_TEST run etcd -- py.test -vv '{posargs}'
[testenv:py312-etcd]
commands = {toxinidir}/setup-etcd-env.sh pifpaf -g TOOZ_TEST run etcd -- py.test -vv '{posargs}'
[testenv:py{3,39,312}-etcd]
commands = {toxinidir}/setup-etcd-env.sh pifpaf run etcd -- stestr run {posargs}
allowlist_externals =
{toxinidir}/setup-etcd-env.sh
[testenv:examples]
commands = {toxinidir}/setup-etcd-env.sh pifpaf -g TOOZ_TEST run etcd -- python {toxinidir}/etcd3gw/examples/etcd.py
commands = {toxinidir}/setup-etcd-env.sh pifpaf run etcd -- python {toxinidir}/etcd3gw/examples/etcd.py
allowlist_externals =
{toxinidir}/setup-etcd-env.sh
[testenv:releasenotes]
deps = {[testenv:docs]deps}