Commit Graph

91 Commits

Author SHA1 Message Date
Tom Barron
a46649453d Add comment explaining ignore D001 for doc8
because we allow lines in excess of 79 characters in our
doc source.

Change-Id: I44fc982386f624fe44a45e97ef791a5e41ee15fd
2017-04-13 06:36:24 -04:00
Tom Barron
7dfd141915 set basepython for pylint tox env
to python2.7 so that running locally will succeed
and the results will match those for the gate
pylint job.

Partial-Bug: #1673824

Change-Id: I6c45a32ba8e77c35403357b0100379bb536a36b3
2017-03-20 15:44:39 +00:00
Tom Barron
58bd5b0179 Unblock gate failure on docs build
Our form of todo extension does not work with sphinx 1.5.2.

Remove it to unblock gate: we can add todos back in later with
more current methods.  Also clean up some dangling cross-references
in the doc.

Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>
Change-Id: If74b9e32ad2b5d8d70da60895d85588ff993797e
2017-03-03 18:21:45 +02:00
Danny Al-Gaaf
a8ec3317be doc: verify all rst files
Make use of doc8 to verify all rst files which are not
autogenerated for errors and fail if there are any issues
found. The doc8 checks are now part of the tox 'docs'
environment and ran automatically. Checks can also be called
direcly via 'tox -e docs'.

Fix all issues found by doc8.

Closes-Bug: #1664841

Change-Id: I9215524d35646de7485504e4c5ff86fd91a1d09f
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2017-02-15 07:07:42 +01:00
Cao Xuan Hoang
ceb3c72ec7 Remove a py34 environment from tox
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Id8a9dda9ea25b47afc35e0605f4df2f3f22c5f38
2017-02-07 13:28:28 +07:00
Tom Barron
d08713c1a3 Support python 3.5 in tox
Our current tox configuration provides no support for python 3.5
even though it is the version that ships with current ubuntu
(xenial) and Fedora (25) systems, and even though in gate the
python3 jobs run on xenial with python 3.5.

Add py35 env to tox.ini alongside py34, py27, and pep8.

TrivialFix

Change-Id: Ib32069f9185c5233c8f96164781ec66c56db33bd
2017-01-05 18:29:24 -05:00
xiaozhuangqing
82a4244eff [TrivialFix] Correct file mode settings
Drop the undesired executable bit for the following files:
  1. manila_tempest_tests/services/share/v2/json/shares_client.py
  2. manila_tempest_tests/tests/api/test_share_networks.py

Also add pep8 check for new executable files under manila_tempest_tests.

Change-Id: Iaa509fdf4e0ebeb60d71b053f62459992c938468
2016-09-28 17:02:24 +08:00
Lucky samadhiya
d82ac34d0a delete python bytecode including pyo before every test run
Change-Id: Ib1cee0ee3d482b23bbaa19956a10bb2e8fc7d559
2016-09-16 13:57:08 +05:30
Jenkins
ea9748fa4b Merge "In-tree Install Guide" 2016-08-16 08:32:34 +00:00
Goutham Pacha Ravi
33374626db Tox Upper Constraints - strip out reinstalls for remaining jobs
releasenotes and venv tox jobs had redefined the install_command
to reinstall any packages from requirements/test-requirements files.

Since Infra started supporting constrained requirements for these
jobs as well, we can drop the reinstall command.

Ref:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: Ib4b8c6cef22a9911030c2e3e3f5281e7e22575fc
2016-08-14 11:52:05 -04:00
Goutham Pacha Ravi
dfbe3ea418 In-tree Install Guide
The OpenStack install guide team has recommended that projects
that are not part of the starter-kit:compute [1] (and a few other projects
like Cinder and Horizon) maintain their install guide in-tree. [2]

[1] http://governance.openstack.org/reference/tags/starter-kit_compute.html
[2] http://git.openstack.org/cgit/openstack/docs-specs/tree/specs/newton/project-specific-installguides.rst

Change-Id: I2b49fcfd99b3be40bb1ae7d7b8348abdb5b58b90
Co-Authored-By: Denis Cavalcante <dencaval@gmail.com>
Implements: blueprint manila-in-tree-install-guide
Partially-implements: blueprint projectspecificinstallguides
2016-08-12 08:06:38 -04:00
Daniel Gonzalez
3e86e3deac Migrate API reference into tree
The API Documentation team has requires [1] that
projects maintain their api-reference in-tree and
build it to the developer.openstack.org website.

This version of the API reference uses os-api-ref
and compiles API documentation close to that of
the OpenStack compute service (nova).

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

Implements: bp move-manila-api-reference-in-tree
Change-Id: I67bb3354162d6e0e00fa2788edde864cc14920ee
2016-07-25 15:55:00 +00:00
Andreas Jaeger
d2b2cc80e9 Use constraints for coverage job
OpenStack CI supports now constraints in the coverage job - as a first
job to check that the recent changes for zuul-cloner work correctly.

Use constraints for cover environment.

Change-Id: I81a985a2049221a8a7ac1f20642137f22847973f
2016-07-17 16:00:41 +02:00
Marc Koderer
829052d6dd Add tox job for db revision creation
Trivial-Fix

Change-Id: Ie87b84ddd546149ca5d9eaf2179c514071c75695
2016-07-15 05:06:25 +00:00
Matt Riedemann
0b59a910fb update min tox version to 2.0
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: I27348462a21daab479d76b24b48e3a4e017504cc
2016-07-10 11:51:30 -04:00
Sean McGinnis
c9e1a1aabc Use upper-constraints in tox installs
The tox targets do not currently use upper constaints, resulting in
stable branch test runs pulling down newer library versions than what
should be supported for those releases.

This adds upper-constaints for test environment setup.

Change-Id: I1ff164242901a891fb45da03b1595b2e9246a765
Closes-bug: #1596246
2016-06-25 20:02:00 -05:00
Valeriy Ponomaryov
94cf34992c Add more dir exceptions to pep8 tox job
Manila has more dynamically created dirs than we exclude in
pep8 job. Such as 'build' and 'cover'.
Therefore, exclude them too to speed up passing of pep8 job on dev
machine where lots of dynamically created things exist.

TrivialFix

Change-Id: I256720846acdd584cadaf59e9dedaad0ff741ae3
2016-06-08 15:53:38 +03:00
Tom Barron
be01b39066 Squash E042 and E043 bashate warnings
The bashate tool has been upgraded and now issues new warnings.

Squash these E042 and E043 warnings since our shell scripts
are doing the right thing currently and changing them to avoid
the warnings makes them less readable and more fragile.

Change-Id: I25ff337160ab176bb150a6186f6c3198cc068732
2016-05-24 16:49:55 -04:00
vponomaryov
7999280fb9 Add Grenade support to Manila
Grenade is an OpenStack test harness to exercise the upgrade
process between releases. It uses DevStack to perform an initial
OpenStack install and as a reference for the final configuration.

Add support of it to Manila project, doing following changes:
- Add all required scripts for 'grenade' job, such as following:
-- settings
-- shutdown.sh
-- upgrade.sh
- Add optional 'resources.sh' script that performs functional
  tests using bash and manilaclient. List of scenarios:
-- 1. create and delete share setting metadata and access rule
-- 2. attach security service to share network
-- 3. update quotas
-- 4. create private share type and add access for project

Note following:
- Tempest is not used by design.
- Manilaclient is used of stable version - version of 'base' devstack,
  which is 'stable/mitaka'. It also means that used API microversion
  is latest for that branch.

Change-Id: I7d7e0c50933776ca1a710bcf069abb0282b821ac
Depends-On: I4232382d3c944666bbf0916a3f285b84f6ff9d64
Implements blueprint grenade
2016-04-22 12:46:37 +03:00
Tom Barron
1c2ec9b8cf Detect addition of executable files
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
2016-04-08 14:28:42 +00:00
Tom Barron
72ab1442ad Remove unused logging import and LOG global
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
2016-04-05 07:06:08 -04:00
Jenkins
c2a76dc2ac Merge "Add tox fast8 option" 2016-02-22 23:23:44 +00:00
Jenkins
e48d2369c5 Merge "Use ostestr to run unit test" 2016-02-22 23:23:09 +00:00
Tom Barron
dec5c87b59 Squash E006 bashate warnings
bashate, which is invoked when running 'tox -epep8', currently
emits many 'E006: Line too long' warnings.  We apparently don't
really care about line length in shell scripts and ignore these
warnings.

This commit instructs bashate to suppress these warnings so that
we can see any warnings that we really care about.

Change-Id: I565aeaef1f0590e5a6ee6a866974765c748f2965
2016-02-21 10:18:58 -05:00
Tom Barron
334e08121c Add tox fast8 option
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
2016-02-21 09:19:39 -05:00
ting.wang
145fabe7dd Use ostestr to run unit test
The ostestr command provides a wrapper around the testr command.
By default it also has output that is much more useful for OpenStack’s
test including lists of all and failed tests and lists of the 10
slowest tests.
ref:
http://docs.openstack.org/developer/os-testr/ostestr.html

Change-Id: If005d1987b2a4e586cf35f0cc1d07739f84235d2
2016-02-18 23:18:44 +08:00
David Sariel
4a61faa065 Removed ignored checks from tox.ini and fixed pep8 issues
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
2016-02-14 14:56:55 +02:00
Jenkins
b7002e2e56 Merge "Clean up removed hacking rule from [flake8] ignore lists" 2016-01-15 14:56:59 +00:00
LiuNanke
85082c5782 Clean up removed hacking rule from [flake8] ignore lists
We bump hacking>=0.10.0, and hacking removed some rules, for
the full list of rules please see [1]. So don't need them any more.

Hacking related commits:
Remove H904 in commit b1fe19ebebe47a36b905d709467f5e82521bbd96
Add H105 using author tags
Add H238 hacking no old style class
Add H501 hacking no locals
[1]https://github.com/openstack-dev/hacking/blob/master/setup.cfg#L30

Change-Id: I6a1f3c3ef22be0962ffb81a5da5660837552e5d7
2016-01-14 23:27:17 +08:00
ting.wang
d517d1344b Add debug testenv in tox
Once we add debug testenv, we can use "tox -e debug -- --debug"
to debug test cases when tox is running.

Change-Id: If12d6c7bd8b1ae04096b526ad37978f60fdb70db
2016-01-11 19:39:08 +08:00
houming-wang
9a74a01855 Fix wrong flake8 exception and pep8 violations
In the tox.ini, [flake8] section, "exclude =
.venv,.tox,dist,doc,openstack,*egg". From this rule, all 'openstack'
directories are excluded. This rule is intended to exclude
manila/openstack/common code check, but this is wrong
because it also exclude checks against manila/api/openstack and
manila/tests/api/openstack. We should fix it

Change-Id: Ie820e3931e83a82c40b0d9b9d943787a5d6ec363
Closes-Bug: #1529092
2015-12-24 21:45:39 -05:00
Ondřej Nový
df528e5458 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: If04bf146f45d4c7300058c2c441a12ab8f952225
2015-12-24 12:06:11 +00:00
Jenkins
ab048dc85c Merge "Delete python bytecode before every test run" 2015-12-04 10:55:31 +00:00
Jenkins
3b1e0b34d5 Merge "Put py34 first in the env order of tox" 2015-12-03 09:42:59 +00:00
Shuquan Huang
031c49461e Put py34 first in the env order of tox
To solve the problem of "db type could not be determined" on py34 we
have to run first the py34 env to, then, run py27. This patch puts py34
first on the tox.ini list of envs to avoid this problem to happen.

Change-Id: Id54bb80944385579cfa136fce78cb5be55393f81
Closes-Bug: #1489059
2015-12-02 22:56:19 +08:00
Thomas Bechtold
1dac1ac49e Add reno for release notes management
See mailing list announcement:

http://lists.openstack.org/pipermail/openstack-dev/\
        2015-November/078301.html

Change-Id: Iac50ba371fcf6cb890bddbef30d846304056f317
2015-11-26 07:16:03 +01:00
OTSUKA, Yuanying
40f5e2234a Delete python bytecode before every test run
Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.

Change-Id: I9e3b8c8cb0e6df8f3b67ec9d4fc5bc5d25356d16
Closes-Bug: #1520036
2015-11-26 10:59:46 +09:00
Valeriy Ponomaryov
75290c5534 Add py34 to test environment to tox.ini
Manila code base was updated to work on top of python3.4
So, add its test environment to tox.ini

Change-Id: I1403b6b758de52110a53e571c81863c98e909b99
2015-08-12 12:22:31 +03:00
Valeriy Ponomaryov
4ea9031b4f Make coverage tox job fail when test coverage was reduced
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
2015-07-27 14:53:37 +03:00
Jeremy Stanley
74f09b7379 Remove unneeded OS_TEST_DBAPI_ADMIN_CONNECTION
The desired OS_TEST_DBAPI_ADMIN_CONNECTION string is now reflected
in the oslo.db 1.12.0 release's default behavior, and so does not
need to be set any longer to achieve the same opportunistic backend
discovery for tests.

Change-Id: I9e7239c71371bc872f5ae41e4f0f3c8942f3d9b3
2015-07-03 23:06:05 +00:00
Jeremy Stanley
1548d460b8 Override opportunistic database tests to PyMySQL
Set the OS_TEST_DBAPI_ADMIN_CONNECTION override variable so that
oslo.db opportunistic detection will know to use PyMySQL until
I12b32dc097a121bd43991bc38dd4d289b65e86c1 makes it the default
behavior.

Change-Id: I1b27cbdc0612ac63501e2f132bab1c065fe9a3ba
Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
2015-06-18 19:06:01 +00:00
Valeriy Ponomaryov
9d6ae07585 Remove unused contrib/ci files
Files located in contrib/ci/multi_backend are unused. So, remove it.

Change-Id: Ibe9cb2321936c3dcecbb61bc23a7c5c6d9e90bd4
2015-06-08 11:33:31 +03:00
Julia Varlamova
b6ab3167dc Use entry_points for manila scripts
Manila scripts located in bin/* should be covered with unit tests.
In order to add unit tests for bin/* scripts:
- all
- api
- manage
- scheduler
- share
we move them into manila/cmd and use pbr to setup console scripts
which will call the respective main function of each script under manila/cmd.
It will allow us to import from manila.cmd and individually test each 'main' function.

Add unit tests for manila/cmd/* scripts.

Implements bp unit-tests-for-manila-scripts

Change-Id: I9be6b948a6de7ba76405411e98d7531cf225b57e
2015-04-14 21:04:01 +03:00
Luis Pabón
72d2840048 Enable developers to see pylint output
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>
2015-04-03 15:10:18 -04:00
Thomas Bechtold
6785cad994 Enable bashate during pep8 run
bashate checks shell script syntax (similar to pep8 for python). Fix
currently available scripts and enable the check for the scripts.

Change-Id: I33dc8c44a58f40e8bca9e29cd717caf46e5cd586
2015-03-18 13:40:03 +01:00
Valeriy Ponomaryov
bcbab9ce11 Remove Python 2.6 classifier
OpenStack projects dropped support for py26 in Kilo release. So, remove its
classifier.

Change-Id: I22f18eeb9c66837475fa46b06ca4e7b5492065ef
2015-03-01 08:13:45 +00:00
Jenkins
c088dc8fad Merge "Silence tox warning" 2014-10-27 01:24:45 +00:00
Jenkins
8cc70c0d82 Merge "Switch to oslo.config" 2014-10-24 16:33:05 +00:00
Andreas Jaeger
883e02f219 Switch to oslo.config
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
2014-10-22 19:55:45 +02:00
Andreas Jaeger
9cd58e5741 Silence tox warning
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
2014-10-21 09:37:15 +02:00