When running pep8 checks, fail if executable
files have accidentally been added.
Co-Authored-By: Eric Harney <eharney@redhat.com>
Closes-Bug: 1566328
Change-Id: I7280c0403cd473cd4b88cfc021d4f605a7bb35f2
This patch removes unused global LOG variable
and logging imports from various manila modules,
and adds a script to be run as part of pep8 that
will ensure that these do not creep back into
the codebase.
Change-Id: I162c4b2478df45aaf6ea8009b102d6de1a4e309e
This commit ports over the fast8 option from cinder, which enables
one to run pep8 only on one's changeset rather than against the
whole body of code via:
tox -efast8
Change-Id: Icb0286c3c66983f2f106c163cb11c690b2c57849
Due to the hacking version update several pep8 checks where ignored
in the flakes8 section of the tox.ini. Removed ignored checks and fixed
appropriate pep8 issues.
The list of fixed issues:
- H105 Don't use author tags
- H238 Old style class declaration, use new style (inherit from `object`)
- H501 Do not use self.__dict__ for string formatting
Closes-Bug: 1530719
Change-Id: I890ba4c54b0da10060767620ff5ff7e480d79a9c
Oslo incubator is going away, and we cannot use the sync script
to copy the incubator files to Manila one last time because at
least one file has changed in Manila since the last sync. This
commit includes the remaining changes which we do want. The files
are consistent with the oslo-incubator master branch as of commit
305c2b0d52d387c0039e3b3021c4de27e85cd175.
Change-Id: Ib880a0108e4a567ebe39aa1ada7f872c63a818f1
Our 'cover' tox job does not work with release of 'coverage' package v4.0
It fails on option 'ignore-errors' in config section '[report]'.
So, replace usage of this option with CLI option '--ignore-errors'.
Change-Id: I404e3cb63453b0245ac05b4d3cb5780e5b8b7f9a
Closes-Bug: #1497897
For the moment we can just calculate coverage and generate html with results.
It would be really useful to be able to get 'failure' by this job, when
latest commit introduced reduction of test coverage by any reason - either
addon of new code not covered with unit tests or deletion of existing unit
tests.
It will reduce total required efforts for code reviewers, that are forced now
to perform such check separately and inform about it committer.
Added file 'tools/cover.sh' is taken from OpenStack Rally project as
of state [1], with couple of fixes for satisfying 'bashate'.
Also add configuration file for coverage package.
[1] I7b4defe187c0631928d70bd09d7bcea956f4eed3
Change-Id: Ie0c5721985ae48256d9bb26af5fdb4b05797b359
The program tools/lintstack.py which is executed by
tools/lintstack.sh when Jenkins runs, only tests for differences
in the output of pylint. Right now, there seems to be
17 errors/warnings that are being carried over from fix to fix,
with no difference between fixes, and so no failures in the
pylint Jenkins job.
It is really difficult to tell what the errors are, so this fix
allows developers determine what the errors are by running the
following command:
$ tox -e lint
A sample output of the command is available as an attachment
to the bug.
Change-Id: I88487829576d55d437b934e08571013b7a6e57cf
Signed-off-by: Luis Pabón <lpabon@redhat.com>
Closes-Bug: #1356588
Signed-off-by: Luis Pabón <lpabon@redhat.com>
six is the canonical compatibility library for supporting
Python 2 and 3 in a single codebase.
The urlparse module was removed in Python 3 and we should
use 'six.moves.urllib.parse' instead of 'urlparse' to make
code compatible with py 2 and 3 as well.
Partially-implements blueprint py3-compatibility
Change-Id: Ib27244d0583e81e307d5e4236cbf85d29566dde9
Remove obsoleted modules from tree.
Sync with oslo-incubator at commit
838a2a31fe009feb2501716d6656eeea426ea357.
The updated lockfile module needs setting of the lock_path option,
ensure that it is set in the testsuite.
Closes-Bug: #1382189
Change-Id: I43ca76a21bd5bdb45f23af9b99b96aefa635ccc1
The config module in oslo-incubator has been replaced by oslo.config.
Projects need to switch completely to oslo.config for kilo.
This patch does:
* Register options with oslo.config (new file manila/opts.py)
* Generate the config file using oslo-config-generator
* Remove obsoleted entries for this from openstack-common.conf
* Remove oslo-incubator config files
Change-Id: I30b594423c08782e13a1f615099ae65f997a8551
Closes-Bug: #1382183
Fix and enable flake8 test H404:
H404 multi line docstring should start without a leading new line
Change-Id: I13dc13bb5e81d65300680df094cde538c7a6f6df
Partial-Bug: #1333290
Delete Manila's implementation located in tools/conf and replace
it with common config generator located in tools/config. The new config
generator include config options from other modules (olso.messaging,
oslo.db, oslo.db.concurrency) which improves the generated sample config.
Change-Id: I553e1a8ec414383e2d79d445ebd10e0e1ffa1ae4
Generated with: `./update.sh --module config --base manila
../../stackforge/manila/` from oslo-incubator, commit fed72f32.
This common code is expected to be used instead of Manila's
implementation located in 'tools/conf'.
Change-Id: I147888ba98ccb2ec98b9ced87b06d8f4766ec361
six is the canonical compatibility library for supporting Python 2 and 3
in a single codebase.
The basestring was removed in Python 3 and we should use 'six.string_types'
instead of 'basestring' to make code compatible with py 2 and 3 as well.
Partially-implements blueprint py3-compatibility
Change-Id: Idb452afdc2a828089627e14f90c53f3967ceb2ad
Manila's test framework is pretty old and requires update.
Changes:
- usage of nose replaced with testr
- now all the tests are thread safe
- added new options for run_tests.sh, such as --concurrency, --debug, etc...
- new '--concurrency' option for run_tests.sh defaults to 1, examples:
./run_tests.sh # will run in 1 thread
./run_tests.sh --concurrency 2 # will run tests in 2 threads
- added tools/colorizer.py for colorizing output of testrun with run_tests.sh
- tests running with tox use as much threads as cores available by default
- examples of testrun with tox:
tox # will run test suites defined with 'envlist' in tox.ini, now it is pep8,py26,py27
tox -epy27 # amount of threads is equal to amount of cores
tox -epy27 -- --concurrency=2 # amount of threads is 2
tox -epy27 -- --concurrency=4 # amount of threads is 4
- Added 'Database' class to manila.test module, for more conveniant db testing
- updated policy file 'manila/tests/policy.json' to allow share-network actions
- removed nose-related requirements
- added new requirements for testrepository, subunit
With merge of this change all old installed virtual environments become
incompatible and should be removed with "rm -rf .tox .venv" before testrun.
Implements blueprint testr-with-unittests
Change-Id: I9579ecd538e29d478dbc12adc7dcc33fc668b397
'print' function is compatible with 2.x and 3.x python versions
Partially-implements blueprint py3-compatibility
Change-Id: Idea6704be7f49778ca9e99be5b7f449cb89f39dc
See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on
why this exists.
As of this fix:
https://github.com/eventlet/eventlet/pull/34
which was released in eventlet 0.13, we no longer need the patch.
This has now been removed from oslo-incubator, so this is really just
syncing that removal.
Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353