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
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: I6a50c553779a2d185da1a82898541adb35130f69
I tried to remove --sitepacakges and the gate failed
so I added comment and in the .zuul.yaml so future people
will understand why.
I Updated the tox.ini environment description so if someone
does a tox -av it will list all command supportted and a
small description of what
While dcoumenting the zuul.yaml I noticed that I made
patrole-reader a job and I feel that we should also
have it as a gate.
I also saw that extension and multi-node non-voting jobs
where missing reader versions so I added them.
Change-Id: I7b8e4c06ece6b32cab4d7238d0bc250334a3adb3
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update classifiers
- Use newer openstackdocstheme and Sphinx versions
- Cleanup */source/conf.py to remove now obsolete content.
- Remove install_command from tox.ini, the default is fine
- Remove hacking requirements from lower-constraints, they
are not needed for install
Change-Id: I150a5ee2cd08abf5ce9cf9daf2835007dea0dffd
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
This commit add PDF building tox.ini environment and options for LaTeX
output. The chapter header in README.rst has been changed because "Team
and repository tags" is not appropriate for the title of this document.
And, this commit also updates repository URLs to opendev.org.
Change-Id: I1337f3185d72108eef2968cca3cb81d52e742e90
Story: #2006070
Task: #35469
With python3.6 and python3.7 jobs added to the Zuul jobs, it makes sense
to add this to the tox config too.
Change-Id: If43229826b4860e39eb3334609a77be13f0df5fe
This package is used for automatic generation of autodoc
documentation which offers the following advantages:
* the Patrole framework for all modules is always built
and kept up to date
* it is isolated in its own page layout
* it can still be linked to by other documentation pages
easily
Change-Id: I101557efe47293f88ee65b99275fdc8424c02e35
The commands used by constraints need at least tox 2.0.
Update to reflect reality, which should help with local running of
constraints targets.
Change-Id: I343da220ef68a56448042046bf644b964ef71f62
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: I6e73db41d64343dc76ef33bed4638c93b131bd88
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: I6aa7ffba825c9186198f691992199f51f8804823
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Curly quotes usually input from Chinese input method.
When read from english context, it makes some confusion.
Change-Id: I46c0c3bfc49fb657eb5c6fbad24682f1d579a121
This commit switches to use stestr command to run unit tests directly.
Recently, the latest ostestr command uses stestr instead of testr.
However, we should use stestr directly because it's simple and
straight forward. There is no reason to use ostestr for unit tests
anymore.
Modeled after Iff4abef50178bdc83b868eed4a906e22d790762b
Change-Id: Ie50cd57e87bc049c29b86fce67cc1a2061dad690
This PS auto-generates the sample config file using
oslo-config-generator which is how every project should reliably
produce a config file.
In addition, the Patrole documentation was updated to link to the
generated config file, so that the documentation accurately
shows config options.
Change-Id: Ib3c39084b4c2b5a0078d1293d882cf9a9050b29b
Closes-Bug: #1709490
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
The [rbac] configuration group has been deprecated
and will be removed in the next release. It has been
renamed to the [patrole] group which contains
the exact same options.
This commit makes necessary deprecation changes,
along with renaming changes to documentation, unit
tests and framework.
Change-Id: I71198506b97b98ac18a969b7e6b13b664579c081
Currently, to run unit tests, Patrole relies on a whitelist file
to separate unit tests from API tests so that tox -e py27/35 works.
However, this approach is hackish and has been abandoned in
favor of the following standard approach:
- Use OS_TEST_PATH to .testr.conf
- Override OS_TEST_PATH for unit test jobs in tox.ini
- Remove the whitelist file as it's no longer needed
Change-Id: Iedbd01b539d24dc57e3c8bc1bb0dbb3ea9127ef4
[H106] Don't put vim configuration in source files.
[H203] Use assertIs(Not)None to check for None.
[H904] Delay string interpolations at logging calls.
This change makes Patrole's hacking consistent with
Tempest's [0][1].
[0] https://review.openstack.org/#/c/408211/
[1] https://review.openstack.org/#/c/408066/
Change-Id: Ia56f66b4ab7e1eea6a8bfea05bf52865be13430c
This patch:
- Adds hacking check to Patrole (executed via tox -e pep8)
- Corrects a few hacking errors
- Adds hacking documentation to Patrole
Change-Id: Id43e24060a5290df91c594df6a38ba0cb239bbaf
'check-uuid' and 'check-uuid --fix' are not working because we do not
set package name for them. This patch fixes that.
Change-Id: I553c364e3fc0d640620a01046dd7f70bdb704be2
Closes-Bug: #1678407
Specify test directory so that tox won't complain
`ImportError: Start directory is not importable`.
Change-Id: I03108f71254e8cc99fb0fcab7d4f1f8614b4e60e
Closes-Bug: #1666560
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
Currently, the api and scenario tests are skipped when tox is run,
i.e. when tox -e py27 and tox -e py35 are executed. This is not ideal,
because an error could be thrown when trying to import modules into
the api and scenario tests. Instead, these tests should never
be discovered by ostestr. This will resolve issues with the new
framework changes [0].
This change simply creates a new file called test-whitelist.txt
which is used by the parameter --whitelist-file in the
command under [testenv] in tox.ini. It ensures that only
the regexes specified in test-whitelist.txt are executed [1] --
so only the unit tests are executed with tox (as currently
no functional tests are in Patrole).
Also added check-uuid to pep8 in tox.ini.
[0] https://review.openstack.org/#/c/433741/
[1] https://docs.openstack.org/developer/os-testr/ostestr.html
Change-Id: I1c6bca9044a74e8909754f106880636739e5a822
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