This adds functional tests with redis and redis sentinel, to ensure
the current implementation can initialize clients properly.
Change-Id: I6318f6ad00d5b0ee3db1be5e8671a4c346b9daff
We also remove these unnecessary linter dependencies from
test-requirements.txt.
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I2955b4a99c6963977272e6946058fe8134dfc45a
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints[1].
I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html
Change-Id: I8c7f9291652a58b8291c3df90571501eed43bf18
Flake8 is covered in the pre-commit hooks
Change-Id: I0fc88f0dd641b82c5a3456d687c5958d94667eb0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
The main goal is to use oslo.cache to design pre-commit for oslo.* and
then spread its use widely on oslo's world.
pre-commit will be used to:
- trailing whitespace [2].
- Replaces or checks mixed line ending (mixed-line-ending) [2].
- Forbid files which have a UTF-8 byte-order
marker (check-byte-order-marker) [2].
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs) [2].
- Check for files that contain merge conflict
strings (check-merge-conflict) [2].
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements) [2].
- Attempts to load all yaml files to verify syntax (check-yaml) [2].
- replace tabs by space (4 by default)(remove-tabs) [3].
- Run flake8 checks (flake8) (local)
[1] https://specs.openstack.org/openstack/oslo-specs/specs/policy/contributing.html
[2] https://github.com/pre-commit/pre-commit-hooks
[3] https://github.com/Lucas-C/pre-commit-hooks
Change-Id: I9170cc31b91f8f25d66ff1b8537c55aced672785
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Refactoring the functional tests by using the standard usages [1]
and best pratices available in the oslo.cache documentation.
The main goal of these changes is to help us to
test oslo.cache in the way that quite close to real life usages.
To test new backend now we just need to create the associated test class
dedicated to pass backend's config fixture.
These changes allow to test a new backend by:
- passing the right config to backend by using dedicated config fixture;
- adding the zuul job dedicated to manage functional tests
against etcd backend;
- adding the right server backend to bindep.
[1] https://docs.openstack.org/oslo.cache/latest/user/usage.html
Change-Id: Iaf196d2d93225afa54e324fb830761049059926e
This project lack of functional tests, these changes aim to introduce them.
These changes activate functional tests for oslo.cache.
They introduced:
- related ci jobs
- splits tests into functional and unit
- bindep to manage backends server
Functional tests support the following backends for now:
- etcd3gw
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Change-Id: I604cb542ac25fd4bfac57ea607b447ac82404b7e
Enable warnings as errors for docs building, fix building of docs.
Use newer TOX_CONSTRAINTS instead of obsolete UPPER_CONSTRAINTS file.
Change-Id: Id3ec68ab35727a28e60fa51a343057240fe62b31
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Blacklist:
- W504 line break after binary operator
- /oslo_cache/__init__.py:17:1: F405 'get_memoization_decorator' may be
undefined, or defined from star imports: oslo_cache.core
Change-Id: I05bcd79e2af259df7642bf759e0e5007c2b1a34c
Update the minversion parameter to use the python -m pip to install
python packages:
https://tox.readthedocs.io/en/latest/changelog.html#id185
Inherit the jobs requirements to simplify maintainance.
Also remove pypy from tox since it's not official supported anymore
and no target exist for it.
Change-Id: I80e95eeff84d9a1a28ee3507db82ae33d2ebb937
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: I91ed3b79467683cfca34ef7d79afeb3e6d966f86
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I48f31084d595c44114391e046e5fe418c1fb787a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: I64a99925b076268be0a472a5dacd1fdb24b26023
We shouldn't be using environment variables in this manner.
Change-Id: Iefaa71a195c6046c770f2f598199073a951df8a5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I829d57082b4fb981dfab6ed0f976bb30f28b7901
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I5314a982b415866c5fddae8bdcf5f57add08d555
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
pep8 under python 3 is more strict than under python 2, so to make
sure our projects meet the more strict standards we want to run the
pep8 jobs using python 3 by default.
Change-Id: Ief10b732be1294bf1f843291311c716b65e6b8be
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I281cd6451968c76cb55d9213aeb5a8da35e006a0
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Support for oslo.cache to use the etcd3 grpc gateway based
HTTP API (/v3alpha) using the python-etd3gw library
Change-Id: I41ed9f6ea72641dc1db5fec45920dc41de5088bf
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.
Change-Id: I3986b19a28f8ac918359abadfde2a8c3ba19f639
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.cache.
Change-Id: I61f9e86ab0fca7a2ccfa310056c3a63e069ac2e4
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv and removes py33 venv.
Change-Id: Icd3a362b785c8071ddc338092e2f0f311522befe
The directory openstack/common doesn't exist any more.
So remove it from flake8 exclude list.
Another commit I46728e40e416bb532b86e2fc29361434fdee1296 fixes
this in oslo-cookiecutter.
Change-Id: I7aa53f37a21151905d9b51836fd244c832c9f6f3
Because python creates pyc|pyo files and __pycache__
directories during tox runs, certain changes in the tree,
like deletes of files, or switching branches, can create
spurious errors.
The target bytecodes for deletion are in normal directories,
but not in dot started directory.
Change-Id: I747401d1c895cc0bffc4666054fdc01264c6fd0f
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if
sdist is expensive
* Remove usedevelop : only needed when skipsdist
is set to True
* Remove install_command : We can just use the
default, we don't need to override
* Remove setenv : We can just use the default as
we don't need any extra environment variables
Change-Id: I4c7772674eec553a131bb31396fb2742d505d452
The dogpile and mongo backends are optional so therefore the
dependencies that are only used for those backends are optional.
This makes use of the 'extras' capability in setuptools to declare those
as optional dependencies if you're using those backends.
If a consumer of oslo.cache wants to use the dogpile backend, for
example, then they install oslo.cache like 'sudo pip install
oslo.cache[dogpile]'.
Note that the dogpile dependency is left in requirements.txt because
the oslo_cache.core module has an unconditional import on that library.
Change-Id: I28332964d568bda405fb8d1376d50db49d288b94