Commit Graph

7 Commits

Author SHA1 Message Date
albailey a72d8edca4 Adding rpm-python to bindep to fix pylint
Tox pylint target fails when it cannot 'import rpm'.
There is no pypi package that provides that, since the
centos rpm-python is meant to be installed on the host.

Adding the bindep entry for rpm-python, which the
zuul job will use to prepare the zuul worker host
to properly provide the necessary rpm.

Story: 2008943
Task: 44183
Signed-off-by: albailey <Al.Bailey@windriver.com>
Change-Id: If904bd184e5aaa458393f3154abb6f9c5f0fb967
2021-12-15 09:13:13 -06:00
Charles Short 9a08e51d41 Cap bandit to v1.6.2
Cap bandit to v1.6.2 so we do not pull in a python3 only version.
Without this fix the unit tests will fail to setup and run properly.

Closes-Bug: 1916494

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I7afbc8d224f28146af42f43593586cd680a52aaf
2021-02-22 09:44:17 -05:00
albailey 2302b0fe2e Enable py3-bandit and py3-flake8 zuul jobs
This reverts commit 4146e2a859.

Removed the calls to tox from within tox, and setup the
top level tox.ini for bandit and flake8 for the sub folders.

Change-Id: I682869c8e839f4f59cdce48cd0b97b4a4324f4a7
Story: 2004515
Task: 40232
Signed-off-by: albailey <Al.Bailey@windriver.com>
2020-06-25 21:04:54 -05:00
albailey e3be9a2776 Update flake8 to verify patch scripts
To prevent the warning about a newer version of pip
available, the following env setting was added

  PIP_DISABLE_PIP_VERSION_CHECK=1

To prevent sub-calls to tox from using the default pip
cache location, rather than whatever a user may override
using xdg env variables, the following has been added:

  passenv =
      XDG_CACHE_HOME

The python patch scripts are now validated by flake8.
All flake8 tox targets are triggered from a single zuul job.

Story: 2004515
Task: 38581
Change-Id: I105512edbd3da15480355e30c0dd14933584a47b
Signed-off-by: albailey <Al.Bailey@windriver.com>
2020-01-31 09:40:27 -06:00
Don Penney f27f1c1539 Add initial unit testing to cgcs-patch
This update sets up the framework for unit testing in
the cgcs-patch module, with some basic test cases.

Change-Id: I209076449353a23bb57e0eee397e614b7e89ad88
Story: 2005939
Task: 34756
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-06-27 15:46:43 -04:00
Al Bailey bcc938ca12 Add additional checks to flake8 job
By setting 'hacking' as the dependency, flake8
will include hacking and other checks.
This is the same set used by other openstack
components.

This commit suppresses any of those new checks that
would fail.
 H101  Use TODO(NAME)
 H102  Apache 2.0 license header not found
 H105  Don't use author tags
 H237  module posixfile is removed in Python 3
 H238  old style class declaration
 H301  one import per line
 H306  imports not in alphabetical order
 H401  docstring should not start with a space
 H404  multi line docstring should start without a leading new line
 H405  multi line docstring summary not separated with an empty line

It also sets the max line length to be very large.

At a later time, additional commits will fix and un-suppress them.

Story: 2004515
Task: 29303
Change-Id: Id572d5c0ecab1854ca881e34b95459ef563be0f2
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-02-04 09:00:45 -06:00
Dean Troyer ba33256f86 Add Zuul test foundation
Add the basics for testing, non-voting jobs until the cleanups merge

Change-Id: I2f57c37335b5625eb1d124e276fbb98d94714d4d
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-07-25 08:48:07 -05:00