Patrole project is not active anymore and its gate is broken.
We waited for couple of cycle to see if there is any interest
in this project and anyone can maintain it. But we did not get any
new maintainers and current QA team does not have bandwidth/interest
to continue maintaining it.
This project was for RBAc testing which is moving towards unit/functional
tests on service side as well as tempest plugins tests.
In QA 2023.2 PTG, we decided to retire this project
- https://etherpad.opendev.org/p/qa-bobcat-ptg
Change-Id: I7721cf06104e5871ec27cdd87d4608dace60a8b7
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: I8c2ad4e15fb42fa5b1aacb3fcde69ecde91c62ce
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: I017716842c61b814bbe16cc2b8788f160f4ad9cd
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.
Update hacking extension for newer flake8. Remove vi header check, this
is enabled as H106 already.
Fix problems found.
Change-Id: Ie4ccf0a1075995f5624a838388b6b0b46343129a
hacking 1.0+ adds a couple of additional checks that are helpful as part
of the transition to Python 3. However, hacking 1.1.0 incorporated
flake8 2.6.x, which transitioned from pep8 to pycodestyle. Tempest
provides some hacking extensions and these use pep8 imports. As things
stand, projects that wish to use these hacking extensions must either
constrain themselves to the same older hacking versions or install pep8
manually. Neither of these approaches is particularly attractive so
instead transition to hacking 1.1.0 ourselves. This has the benefit of
giving us the additional checks for Python 3.
Based off https://review.openstack.org/#/c/580634/1/
Change-Id: I8ed5aa0ccd02a792d26d3bef1949a7e1a3f600ed
hacking is not capped in g-r and it is in
blacklist for requirement as hacking new version
can break the gate jobs.
Hacking can break gate jobs because of various
reasons:
- There might be new rule addition in hacking
- Some rules becomes default from non-default
- Updates in pycodestyle etc
That was the main reason it was not added in g-r
auto sync also. Most of the project maintained the
compatible and cap the hacking version in
test-requirements.txt and update to new version when
project is ready. Bumping new version might need code
fix also on project side depends on what new in that
version.
If project does not have cap the hacking version then,
there is possibility of gate failure whenever new hacking
version is released by QA team.
Example of such failure in recent release of hacking 1.1.0
- http://lists.openstack.org/pipermail/openstack-dev/2018-May/130282.html
Change-Id: I414ebdf1439aa166bc3bec86510404b87e3719ed
There are few requirement which are not needed to be part
of test_requirements.txt and requirements.txt
Change-Id: Iaa182b3c2c5dfa12e5e9302527fff9cc695de481
Update test-requirements.txt to use latest version of:
* hacking
Enable the following off-by-default checks:
* [H203] Use assertIs(Not)None to check for None.
* [H204] Use assert(Not)Equal to check for equality.
* [H205] Use assert(Greater|Less)(Equal) for comparison.
* [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in
mock.patch/mock.patch.object calls
* [H904] Delay string interpolations at logging calls.
Made necessary unit test changes to work with these checks.
Change-Id: I9db3445caa2883563fd7271d6bf0b24800e06c01
This commit creates a test fixture for rbac_utils.RbacUtils
and refactors test_rbac_utils tests accordingly. This
allows other tests to use the fixture as needed, improving
code maintenance and readability, as well as the ease
with which tests can be written.
Specifically:
- adds fixtures file for overriding conf settings and
for rbac_utils.RbacUtils
- refactors rbac_utils tests to use the appropriate
fixture
Change-Id: I2f49137ff71089ecf9764ee1f7887b64185249dd
As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.
[0]https://review.openstack.org/#/c/472275/
Change-Id: I18e7db0410ffa28d6a62a1adfb1a7eabe610c950
Currently, tox -ecover doesn't work. This patch simply uses
nosetests and nosecover to generate a correct coverage report for
unit tests.
Change-Id: Ib7093796ead2bbef5c588c304336582f06ddd1c3
Includes:
rbac_util - Utility for switching between roles for tests.
rbac_auth - Determines if a given role is valid for a given api call.
rbac_rule_validation - Determines if a allowed proper access and denied improper access (403 error)
rbac_role_converter - Converts policy.json files into a list of api's and the roles that can access them.
One example rbac_base in tests/api/rbac_base
One example test in tests/api/images/test_images_rbac.py
New config settings for rbac_flag, rbac_test_role, and rbac_roles
Implements bp: initial-framework
Co-Authored-By: Sangeet Gupta <sg774j@att.com>
Co-Authored-By: Rick Bartra <rb560u@att.com>
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>
Co-Authored-By: Anthony Bellino <ab2434@att.com>
Co-Authored-By: Avishek Dutta <ad620p@att.com>
Change-Id: Ic97b2558ba33ab47ac8174ae37629d36ceb1c9de