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
In 7828bed0febabfa11a0a8f6960f4c7cc8acec841 we were introduced
python-binary-memcached in requirement, and we need these
package to support sasl protocol, so we should bump
python-binary-memcached>=0.29.0 in oslo.cache requirements.
Only required for sasl/binary protocol
Co-Authored-By: Brin Zhang <zhangbailin@inspur.com>
Change-Id: Ic4335f0a81c6189d6d0ad254c4a1bb86dbd11500
Implements: blueprint enable-sasl-protocol
Flake8 is covered in the pre-commit hooks
Change-Id: I0fc88f0dd641b82c5a3456d687c5958d94667eb0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393
Change-Id: I8bce844a47a2af7abf2069bb8105eb7832c678e3
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I4df9a945e33c7b77c38d139195cab2fa0481209e
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
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
pymemcache turned out to be far from drop-in replacement.
It will be reintroduced as another backend. See [1].
Closes-bug: #1866008
Related-bug: #1812935
This reverts commit 8a8248d764.
[1] https://review.opendev.org/711220
Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
Change-Id: Ia3b8d42435b0eac1c87b866449b08a1d11818986
Switch memcachepool to use pymemcache.
This change switches from python-memcached to pymemcached for
the memcachepool backend fixing an issue due to the
__new__ attribute reassign.
Change-Id: Icaa6b252145685d1b5667b883e3bf693920b5b93
Closes-Bug: #1812935
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.
Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.
Change-Id: I4ee88377e7123c165434765a73f27cabec8c8177
Reference: https://github.com/PyCQA/bandit/pull/489
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>
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
Support for oslo.cache to use the etcd3 grpc gateway based
HTTP API (/v3alpha) using the python-etd3gw library
Change-Id: I41ed9f6ea72641dc1db5fec45920dc41de5088bf
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: Ib81c7b9dc97b8ab9eaf479de96bd3707c90a0c9d
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
While trying to use oslo.cache, the keystone team noticed that
an exception was referenced, but not defined. This led to
finding further issues, since _memcache_pool had no tests.
Change-Id: Ia4d025fb05575c30ff37b480b92c82595241046d
The first attempt at getting all the tests to work missed out the
config_overrides in the base test class and the 'role' and
'assignment' groups.
Also, sha1_mangle_key was added to encode the key before calling
dogpile's sha1_mangle_key to support all the python34 tests.
Removed the skipIf's added for py34 as the tests are now working.
Also removed the testtools from requirements as we don't need it
anymore.
Change-Id: I0e09429e6739dc946f6e15398ccb264b4d62bb42
* Move files from keystone folder into appropriate folders
* Move tests from keystone into appropriate folders
* Fix imports to use the new module locations
* Add a _i18n.py to help with localication
* Add a BaseTestcase class
* Add a exceptions module
All just enough to run the tests. Though some tests were commented
with a FIXME to be fixed in later commits.
A few additional tests were not working with py34 and they are
skipped using testtools.skipIf statements.
Change-Id: Ib494d2a960cab5959c2adaca1eb0739fe65d14f1