Commit Graph

53 Commits

Author SHA1 Message Date
Takashi Kajinami 6c73ace4f7 redis: Add functional tests
This adds functional tests with redis and redis sentinel, to ensure
the current implementation can initialize clients properly.

Change-Id: I6318f6ad00d5b0ee3db1be5e8671a4c346b9daff
2024-02-04 13:20:54 +00:00
Takashi Kajinami 124d50e1bd pre-commit: Integrate bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I2955b4a99c6963977272e6946058fe8134dfc45a
2024-01-30 13:41:34 +09:00
Takashi Kajinami a977dd9109 Bump hacking
hacking 3.0.x is too old.

Change-Id: I9100cbb92c404f55944dc96b65cd2577ba4db194
2024-01-16 22:25:37 +09:00
Hervé Beraud 8d856e1d17 Bump bandit
Change-Id: I36c2cdc9ecbdbfb443c8780494531c84bc7793ca
2023-05-17 16:03:23 +02:00
Hervé Beraud f4fa6aa6fa Add socket keepalive options to oslo.cache
This patch specifies a set of options required to setup the
socket keepalive of the dogpile.cache's pymemcache
backend [1][2]. This setup from those options can later on
be passed to this backend.

This patch also sets up the socket keepalive object based on
the configuration options passed via oslo.config and adds it
as an argument to be passed to the selected oslo.cache backend.

Dogpile.cache will be used as an interface between oslo.cache and
pymemcache [3].

[1] https://github.com/sqlalchemy/dogpile.cache/pull/205
[2]
b289c87bb8
[3]
https://dogpilecache.sqlalchemy.org/en/latest/api.html?highlight=keepalive#dogpile.cache.backends.memcached.PyMemcacheBackend.params.socket_keepalive

Change-Id: I501100e1a48cdd4e094c08046e2150405dcf371e
2022-01-07 11:58:28 +01:00
Moisés Guimarães de Medeiros b00b3b23b4 Add dogpile.cache.pymemcache backend
Depends-On: https://review.opendev.org/c/openstack/requirements/+/772684
Change-Id: Ibdc6015ac1a9812976c4f3d8a737f7245599553e
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2021-01-27 15:11:27 +01:00
dengzhaosen c872fc0b94 Add python-binary-memcached to support SASL
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
2020-08-19 13:53:31 +00:00
Moisés Guimarães de Medeiros 8979414153 Add pre-commit to pep8 gate
Flake8 is covered in the pre-commit hooks

Change-Id: I0fc88f0dd641b82c5a3456d687c5958d94667eb0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-29 11:16:37 +02:00
Moisés Guimarães de Medeiros e36ae6ce65 Bump bandit version
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>
2020-07-22 17:22:38 +02:00
Andreas Jaeger fc215cc368 Fix pep8 failure
Fix pep8 failure and raise hacking version.

Change-Id: Ife453810ded44f4745d7a815c4b9f68f5d80327e
2020-05-14 17:41:08 +02:00
Sean McGinnis ef606c96ac
Use unittest.mock instead of third party mock
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>
2020-03-31 15:55:13 -05:00
Andreas Jaeger fd5a13bc6a Update hacking for Python3
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
2020-03-30 12:01:19 +00:00
Radosław Piliszek cec9b8801c Revert "Switch from python-memcached to pymemcache."
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
2020-03-24 18:03:05 +00:00
Hervé Beraud 8a8248d764 Switch from python-memcached to pymemcache.
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
2020-02-25 17:17:01 +01:00
Ben Nemec 3e06753078 Cap Bandit below 1.6.0 and update Sphinx requirement
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
2019-05-13 17:55:09 +00:00
Stephen Finucane 6503e2426e Avoid tox_install.sh for constraints support
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>
2019-05-04 07:02:41 +02:00
jacky06 2bfb9f4f96 Update hacking version
1. Use latest release 1.1.0 and compatible changes w.r.t pep8
2. Update json module to jsonutils

Change-Id: I38afd3bfa93b0f378482619880e4df8757d85ef5
2019-03-06 22:25:47 +08:00
Vu Cong Tuan 03dc05dec3 Switch to stestr
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
2018-07-03 16:10:58 +07:00
OpenStack Proposal Bot db748471a7 Updated from global requirements
Change-Id: Ie802df38d54eb4331ab91ec5703896c10703f95b
2018-01-18 03:22:48 +00:00
ChangBo Guo(gcb) e52c99825c Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I46607ac6b8448f6f6373736e54f5f75fa626538f
2018-01-04 13:16:33 +08:00
ChangBo Guo(gcb) a800709d93 add bandit to pep8 job
Add the bandit security scanner to the pep8 job.

Change-Id: Ifd1414536ed2ffa1f0c9ebf012569b5869067793
2017-11-30 10:56:52 +08:00
OpenStack Proposal Bot 2dfa3b47ad Updated from global requirements
Change-Id: Ib7a29ea3402f0e5238d5beaecbf410fd8d9c9e7c
2017-09-20 16:22:44 +00:00
OpenStack Proposal Bot 8e86b565a4 Updated from global requirements
Change-Id: I4b12e03746fff6f2ef2770343c7722ba21e61105
2017-08-18 11:39:47 +00:00
OpenStack Proposal Bot 4230dcf98c Updated from global requirements
Change-Id: I78bde999f5e9de1f7a13ae09bd778f903e42ce02
2017-07-27 19:19:19 +00:00
Dong Ma a190e51574 switch from oslosphinx to openstackdocstheme
Change-Id: I67f62da5b2b3cc89367cdcf731aa33c8161c1f2f
2017-07-06 23:57:57 +08:00
OpenStack Proposal Bot f288eae21f Updated from global requirements
Change-Id: I895f82ad761822f7496d2cda778dfcec35441c0b
2017-06-27 12:19:54 +00:00
OpenStack Proposal Bot 5ff0006de1 Updated from global requirements
Change-Id: I4cd4e1259ad94f438a23d7926268bb6ca51a7342
2017-06-02 22:04:59 +00:00
Davanum Srinivas e79d1ab159 etcd3 driver for oslo.cache
Support for oslo.cache to use the etcd3 grpc gateway based
HTTP API (/v3alpha) using the python-etd3gw library

Change-Id: I41ed9f6ea72641dc1db5fec45920dc41de5088bf
2017-05-26 10:55:25 -04:00
OpenStack Proposal Bot 4d5815de9a Updated from global requirements
Change-Id: I5783edcdcd5ab904ca3b49dbca5322cde11582e0
2017-05-17 03:56:23 +00:00
OpenStack Proposal Bot bae9b6822e Updated from global requirements
Change-Id: I047ac8dede1987df4271c24a71fa97f5e47c40d7
2017-03-03 00:02:46 +00:00
ricolin 96ac4c7fd5 [Fix gate]Update test requirement
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
2017-03-02 18:32:58 +08:00
OpenStack Proposal Bot b4e6983755 Updated from global requirements
Change-Id: I8947eeabb4e738530ccf0996bfc0d0c56ab8a87e
2017-02-10 05:57:26 +00:00
OpenStack Proposal Bot ac2dc875fe Updated from global requirements
Change-Id: I55c4558cdc96c30a27a3caac90753dd254616803
2016-11-02 15:38:59 +00:00
OpenStack Proposal Bot 4f9a6dfd99 Updated from global requirements
Change-Id: Icf91c0ffd52d9f5f1dbb1330e4b010a5c0642492
2016-09-28 16:59:25 +00:00
OpenStack Proposal Bot 86bcd66f6b Updated from global requirements
Change-Id: I5aa65e5cd27f034edfb0089ef17c7696793d4a31
2016-06-30 18:48:10 +00:00
OpenStack Proposal Bot f6108b0b66 Updated from global requirements
Change-Id: I5d1d612c9faeba3dfbb7c0431b4fb7354fe84fde
2016-06-03 18:17:47 +00:00
Kirill Bespalov 3e8d5eb932 Add reno for releasenotes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: I2d2ed47f68972f4b67e2ca0e49eddbb82f2af2e7
2016-05-20 17:50:21 +03:00
OpenStack Proposal Bot 2e816912ea Updated from global requirements
Change-Id: Idf49647bac657e6f943d27369c03f68913897bc8
2016-01-16 03:31:01 +00:00
OpenStack Proposal Bot 5e34e01399 Updated from global requirements
Change-Id: I8df32715f5efcd73b63d9fc4a8ed87b0e03ef19d
2015-11-19 16:00:13 +00:00
Matt Riedemann 950a4448e3 Move optional backend dependencies into setup.cfg [extras]
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
2015-08-18 09:09:56 -07:00
OpenStack Proposal Bot ee78000b1b Updated from global requirements
Change-Id: I36e06a0af8e2302d4cb565aaebd0ded0305ee850
2015-08-04 00:56:45 +00:00
OpenStack Proposal Bot 640b000b6d Updated from global requirements
Change-Id: Idc58f12535612970e4b0c809cc9859fe1ed14ace
2015-07-29 03:49:48 +00:00
OpenStack Proposal Bot 212af3df6e Updated from global requirements
Change-Id: I7d9b2c7308218e4279f22eaeb0dd60c387ec32d2
2015-07-22 04:58:50 +00:00
OpenStack Proposal Bot 9e20d07c7d Updated from global requirements
Change-Id: I12462e848b0563c7d428e430057bd96a5976bc08
2015-07-17 16:16:38 +00:00
OpenStack Proposal Bot 3d4e2d66c2 Updated from global requirements
Change-Id: Ib616c355c9168db55cc1cc807d81de719c54a081
2015-07-15 01:36:24 +00:00
OpenStack Proposal Bot 04d321b956 Updated from global requirements
Change-Id: Iaf2fc11b9ad13ce9b05008196693645e8cfc1374
2015-07-12 15:21:22 +00:00
Steve Martinelli 98537c8e0d Add tests for _memcache_pool
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
2015-06-28 19:00:28 +00:00
Davanum Srinivas 3411d7200f Enable all commented out tests
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
2015-06-23 22:16:27 -04:00
OpenStack Proposal Bot 25eace34c9 Updated from global requirements
Change-Id: Ie9daa0246fab7df998f5a5e17b3aea762c2a45e9
2015-06-22 08:26:53 +00:00
Davanum Srinivas 864dfacced Move files into the right spot and get tests working
* 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
2015-06-18 22:14:59 -04:00