Commit Graph

31 Commits

Author SHA1 Message Date
Ghanshyam Mann b540700061 Retire patrole
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
2023-04-10 22:29:00 -05:00
Ghanshyam Mann cfac16a78c Fix gate for multiple issues
1. To have mock installed for unit tests

unit tests jobs use tempest version released in pypi
which has use of mock but in recent changed mock requirement
is removed from requirements file and it end up failing.

- https://zuul.opendev.org/t/openstack/build/c3a33c501c054db9b1eecedb7d4b2c48

Let's add mock into the requirement file to be installed for unit tests
job until we bump the min version of tempest to latest.

2. Nova policy granular work
https://review.opendev.org/#/q/topic:bp/policy-defaults-refresh-deprecated-apis+(status:open+OR+status:merged)
Adding new flag to handle the policy changed in Victoria.

Depends-On: https://review.opendev.org/#/c/745158/

Change-Id: I3683cca390b44146c217ce8600f63a9894057058
2020-08-14 11:49:39 +00:00
Ghanshyam Mann 5a0c57c066 Fix hacking min version to 3.0.1
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
2020-05-12 21:52:09 -05:00
Sean McGinnis c5ea6f2cc7
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: I017716842c61b814bbe16cc2b8788f160f4ad9cd
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-05-08 16:15:18 -05:00
Andreas Jaeger 2aad808184 Update hacking for Python3
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
2020-04-02 15:56:12 +00:00
Gage Hugo 0f73e7ca9f Add bandit python security scanning to pep8
This change adds bandit python security code scanning to the
pep8 zuul check.

Change-Id: I8b6c52bd3fae87c5b49f3cde8bb9e63526155973
2018-08-21 15:51:08 -05:00
Felipe Monteiro 299b9d467d Bump hacking to 1.1.0
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
2018-07-10 18:40:19 +00:00
ghanshyam 58515edc32 Gate fix: Cap hacking to avoid gate failure
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
2018-05-09 16:08:13 +01:00
ghanshyam 932b81d9d1 Update docs building
We need to move to new docs buidling structure as
per the Project Testing Interface (PTI) [0] for doc
build in OpenStack-Infra. More details [1].

[0] https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-November/124815.html

Change-Id: I699095c2eb2c818354fe0502cbbbadd3b9ef2656
2018-03-22 20:31:53 +00:00
OpenStack Proposal Bot 55bc499f5e Updated from global requirements
Change-Id: I96b11a82e3e5bd2174e7040a2fe0ecd686ec718d
2018-03-15 07:53:18 +00:00
OpenStack Proposal Bot ba816be613 Updated from global requirements
Change-Id: Idf288ec61edcd5c29ee43714df529db6e873f555
2018-01-27 02:39:16 +00:00
Zuul 291bd2ff27 Merge "Updated from global requirements" 2018-01-23 02:06:33 +00:00
naseeb 8bd897b7f9 Optimize test_requireemtns.txt and requirements.txt
There are few requirement which are not needed to be part
of test_requirements.txt and requirements.txt

Change-Id: Iaa182b3c2c5dfa12e5e9302527fff9cc695de481
2018-01-18 13:38:29 +05:30
OpenStack Proposal Bot f58755b3fc Updated from global requirements
Change-Id: Ic966dc1bd6130c8764b5a2b8357fa6cdf38619a2
2018-01-18 03:25:43 +00:00
OpenStack Proposal Bot e6a70a5450 Updated from global requirements
Change-Id: I66c591295a8fe3ee01dea7e592fe677cad6ce91a
2018-01-16 04:28:31 +00:00
OpenStack Proposal Bot 3bf15efde8 Updated from global requirements
Change-Id: I1ac96369dec6bc30b3b2561fb551a2c5a4b72ffc
2017-12-07 13:44:40 +00:00
OpenStack Proposal Bot c269b9f92d Updated from global requirements
Change-Id: I0e5e9eb59d64581133ba73a19500ad65bbad14c6
2017-11-15 11:59:12 +00:00
Felipe Monteiro b18a3f6524 [flake8] Enable extra, optional hacking checks
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
2017-09-27 03:31:32 +01:00
OpenStack Proposal Bot 6836b87a9d Updated from global requirements
Change-Id: I58d93e333f3554335a43d9c03f164b004fc715b9
2017-09-16 23:22:34 +00:00
OpenStack Proposal Bot d889ffd1ad Updated from global requirements
Change-Id: I201711517d7cb171840f30f15c3d4c98555db04a
2017-08-24 05:59:05 +00:00
OpenStack Proposal Bot 39c460b247 Updated from global requirements
Change-Id: Ie03bfe1259ff998e4c15c3c38bca21f995d1ab55
2017-08-18 11:40:43 +00:00
OpenStack Proposal Bot 7b9ae3fbc8 Updated from global requirements
Change-Id: Ia0bcd60843a3cabed0295df485b54246e657f1ed
2017-07-28 21:46:33 +00:00
OpenStack Proposal Bot d8e0d08832 Updated from global requirements
Change-Id: I4763723b8267cabf2be101017409c49f8acff945
2017-07-25 20:47:47 +00:00
Felipe Monteiro ffa47e6666 Create rbac utils fixture and refactor tests
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
2017-07-24 19:09:27 +01:00
OpenStack Proposal Bot d55dec5a73 Updated from global requirements
Change-Id: Ib835ceabc06da2beca5c44840fd9c171b7255885
2017-07-14 23:11:03 +00:00
OpenStack Proposal Bot c971b45985 Updated from global requirements
Change-Id: I6db38077d8e5c6fbfa913063f3fead2405116446
2017-07-06 14:03:09 +00:00
Van Hung Pham 34193e3d46 Switch from oslosphinx to openstackdocstheme
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
2017-06-28 14:51:11 +07:00
Felipe Monteiro 1ee5f4d912 Fix test coverage tox command for patrole.
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
2017-03-04 23:27:31 +00:00
Rajiv Kumar 645dfc9238 Switch to oslo_log
Change-Id: Id9ce71a53f4392ea1bd408681d01b6174d86ae61
2017-01-19 14:41:13 +05:30
DavidPurcell 029d8c3126 Initial functionality framework.
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
2017-01-13 11:37:30 -05:00
DavidPurcell 663aedfe46 Initial Cookiecutter commit
Change-Id: Iceff2531f4f7de21dcbb91ee893a8205b6c85107
2017-01-04 15:11:34 -05:00