tox -e genconfig and tox -e pylint both will generate a warning like:
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /home/aj/vcs/OpenStack/openstack/manila/.tox/genconfig
Maybe forgot to specify a dependency?
Whitelist bash to remove the warning.
Change-Id: Ibab38ce2308760c7089d5d3e298bfc642367e7b4
By default, flake8 checks the current directory and its subdirectories,
so it tests already for "." - and "manila/common" is a subdirectory of
it. Thus remove "." and also "manila/common" as subdirectory. Right now
"manila/common" gets tested twice - as part of "." and separate.
Closes-Bug: #1383154
Change-Id: Ie187686bd8b9e9981b2556c1d394fa9a9ca63915
oslo.i18n provides the i18n function that were provided by
oslo-incubator's gettextutils module
Import _ where needed, oslo.i18n deprecated the builtin method.
Closes-Bug: #1382187
Change-Id: I12aa1c725aa4bb52a9aa46e9c3d2b303839de48b
Fix H405:
H405 multi line docstring summary not separated with an empty line
With this patch, flake8 passes all checks (incl. hacking checks)
except the on-purpose disabled check H904.
Closes-Bug: #1333290
Change-Id: If41259aefc4d6d588da5036f1f25df17b88db04f
Fix and enable flake8 test H404:
H404 multi line docstring should start without a leading new line
Change-Id: I13dc13bb5e81d65300680df094cde538c7a6f6df
Partial-Bug: #1333290
Fix and enable E128:
E128 continuation line under-indented for visual indent
Partial-Bug: #1333290
Change-Id: I72f673d291c388fc4df19e9585fb02e23c21fec3
Fix H302 and enable the test:
H302 import only modules.'from X import Y' does not import a module
Fix also in the touched files the following:
E128 continuation line under-indented for visual indent
Change-Id: I3116c030a5dc0b5be2b4413beaa460e483215774
Partial-Bug: #1333290
Enable F841 and fix all issues.
Flake F841 is:
F841 local variable 'XXX' is assigned to but never used
Also fix in changed files some occurences of:
E128 continuation line under-indented for visual indent
H404 multi line docstring should start without a leading new line
H405 multi line docstring summary not separated with an empty line
Change-Id: Ifb08a82d05ac15c8e90f214a96e73d82ff850018
Partial-Bug: #1333290
Add doc venv to align with other OpenStack projects (such as Keystone,
Heat and Nova) who are using 'docs' for their doc builds.
Change-Id: Ib26cdac7142e9ec9efc231a578c14bfc7936ae61
Fix these issues and enable E126 and E127:
E126 continuation line over-indented for hanging indent
E127 continuation line over-indented for visual indent
Also fix a few occurences in the touched files of:
E128 continuation line under-indented for visual indent
H405 multi line docstring summary not separated with an empty line
Partial-Bug: #1333290
Change-Id: If822401fc7e1db49d595a0736a0dff8e00dfd217
Enable the tests and update flake8 comments to note that H904 is ignored
on purpose.
The patch fixes these warnings:
./manila/api/views/limits.py:68:5: E129 visually indented line with same
indent as next logical line
./manila/share/drivers/netapp/cluster_mode.py:352:13: E122 continuation
line missing indentation or outdented
./manila/scheduler/scheduler_options.py:98:13: E129 visually indented
line with same indent as next logical line
./contrib/tempest/tempest/api/share/base.py:210:5: E129 visually
indented line with same indent as next logical line
./contrib/tempest/tempest/api/share/test_rules.py:32:13: E129 visually
indented line with same indent as next logical line
./contrib/tempest/tempest/api/share/test_rules.py:90:13: E129 visually
indented line with same indent as next logical line
./manila/api/views/share_servers.py:28:9: E124 closing bracket does not
match visual indentation
./manila/api/views/share_servers.py:34:9: E124 closing bracket does not
match visual indentation
./manila/share/drivers/netapp/driver.py:336:5: E125 continuation line
with same indent as next logical line
Also fixes other pep8 warnings in these files.
Partial-Fix: #1333290
Change-Id: Ida14ea8f4716e49f7379f929971fd5e462541527
Refactored migration tests to use OpportunisticTestCase, removed
unused code, BaseMigrationTestCase class and ``test_migrations.conf``
file.
Added workaround for bug 1359982 to be able to merge this patch.
Closes-Bug: #1359888
Related-Bug: #1359982
Change-Id: Iade2bd2bf50880e167c5a5be8b1236c437f28702
Fix and enable hacking test:
H402: one line docstring needs punctuation.
Fix testsuite, the change for manila/tests/api/extensions/foxinsocks.py
needs corresponding changes.
Change-Id: I587cd6771787ca56b1410f86a6ec13380bcc206b
Fixes:
manila/scheduler/simple.py:74:45: F812 list comprehension redefines
'service' from line 59
manila/api/v1/share_networks.py:147:41: F811 redefinition of unused
'network' from line 29
Do not blacklist these tests anymore.
Partial-Bug: #1333290
Change-Id: Ibf3c170ada17a7af0708331331bc435942c3763b
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
Fix:
./manila/api/contrib/used_limits.py:45:27: F402 import 'quota' from line
19 shadowed by loop variable
Rename the loop variable.
Remove F402 from ignore list since it now passes.
Change-Id: Iaa1f882d0ce1843496283a922b701860746995a2
Instead of ignoring all flake8 specific errors ("F"), list those
codes that currently fail so that they can be addressed one by one
and the currently passing ones will not get added by accident.
Change-Id: Ia40f0d832b70eeb788ae14a84dc0c40cc2e4724f
Remove comment about H904 since H904 has been removed from hacking,
there's no need to fix it.
Remove E712 ignore since the code is clean.
Remove E711 ignore and fix the problems in manila/db/sqlalchemy/api.py to
make it pass.
Remove H304 ignore since the code is clean.
Change-Id: I4f9477a61d6f1ddde16b5ff9e387c76076c89d6e
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
Get requirements in sync with global requirements again.
As this updates hacking to a more recent version, add
some blacklisting of hacking warnings to tox.ini to
get the gate passing. Those will be cleaned up
in followup commits.
Change-Id: I18f956d999db21be197ce35044623eaa22ed4185
'print' function is compatible with 2.x and 3.x python versions
Partially-implements blueprint py3-compatibility
Change-Id: Idea6704be7f49778ca9e99be5b7f449cb89f39dc
This brings along Hacking requirements to match
other OpenStack projects. Since hacking already
requires the right pep8 pyflakes etc version,
those dependencies are not necessary to be specified
here.
Change-Id: Ifb575aa549bfd0288e44acda9a750ea40b9d14c2
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