76 Commits

Author SHA1 Message Date
Eric Brown
4746e0bb58 Remove py34 tox env and pypi classifier
Currently only py27 and py35 (not py34) is tested in the gate, so
py34 should no longer be part of the tox environment or part of the
PyPi classifier.

Change-Id: I81058c5df47c4dae3c331d0030141896b6a9f1bb
2017-03-20 19:06:51 +00:00
Jeremy Liu
e81b81a027 Enable coverage report in console output
Currently, the coverage test job doesn't provide any test result
to developer, we could enable coverage report in console output
to let the developer know the coverage status when running coverage
test job.
Change-Id: I12764de112e948129e21732faae03562649522fc
2017-01-13 14:14:21 +08:00
Matt Riedemann
c7162854f7 Use upper-constraints when running tox
This is basically a copy of the template used in oslo.messaging
under change 78f113780510b741bc974c69eb9b0718cd657c1d.

Change-Id: I8be883215f27abb58d15b85e8542cbdf32000bac
2016-11-29 11:33:42 -05:00
Tony Xu
8ae2e4c8a1 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim
support for Python 3.5 in the classifier.
This patch also adds the convenience py35 venv.

Change-Id: Ic80a40692726b05f0f9d174f6ba7e7040f30db38
2016-10-26 10:26:48 +08:00
Sean Dague
04613efbcf Make novaclient functional tests use pretty tox
This makes local running of the tests much nicer as we can see the
progress of successful tests working around the testr issue of showing
no output until the end of the run.

Change-Id: I4adc965fd95b6e79a3ec26614d1c9f98262593b9
2016-08-12 06:34:21 -04:00
Andreas Jaeger
d6ca9e2d74 List system dependencies for running common tests
Add an other-requirements.txt file containing a cross-platform list
of dependencies needed for running included tox-based tests. Also
include a tox environment for convenience calling the bindep[*]
utility to list any missing system requirements.

This change is self-testing.

For other-requirements.txt see also
http://docs.openstack.org/infra/manual/drivers.html#package-requirements

[*] http://docs.openstack.org/infra/bindep/

Change-Id: I3c62f6924d2d70e23e6787b8da848fbeb0d52ddc
2016-06-29 09:23:55 +02:00
Jenkins
c3884691a0 Merge "Removed unused Oslo Incubator code" 2016-03-29 14:34:25 +00:00
Ronald Bradford
7e7e5525d2 Removed unused Oslo Incubator code
This is part of graduating projects to using Oslo Libraries.
As this code is not actually used, it is simply removed.

Change-Id: Ib28a957d9a4622064ec5da2ae616ac6f0716bcbf
2016-03-22 18:31:21 -04:00
Christopher J Schaefer
c5272b349b Adding tox support for bandit
Bandit is a code linter which is used to help identify potential
security vulnerabilities. As part of the plan to integrate bandit
into each OpenStack project, support for a tox testenv is step one.
Later, gate tests will also be incorporated.

Change-Id: Ib6ef0a3e8f32f2724314c166d7de50d591c0e949
2016-03-22 16:39:11 -05:00
Ralf Haferkamp
8a2ed13620 Allow to specify a network for functional tests
Currently the tests just attach instances to the first network returned
by "net-list". That might however not be the right thing in some
environments. This change allows to override the default network via the
environment variable "OS_NOVACLIENT_NETWORK". If not specified the
test will fallback to the old behaviour and just use the first network.

Closes-Bug: #1510975
Change-Id: Ie682111127584a33d8e96377d812d3a6352c760d
2016-02-16 12:43:04 +01:00
Andrey Kurilin
426f6afb3c Add functional tests launcher for py3 env
It would be nice to check not only unit test on py3 env, but functional
tests too.

Also, this patch fixes usage of xrange in functional tests.

Change-Id: I15ef204022583a40a02b3f2a48771347ddc95f3e
2016-01-15 13:25:33 +00:00
Janonymous
84c3cacd13 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: I06c6a276b75eb2a3d69e94f467f26122d856d17c
Closes-bug: #1489059
2015-12-22 18:31:30 +05:30
Jenkins
865e084568 Merge "Deprecated tox -downloadcache option removed" 2015-12-16 14:04:54 +00:00
shu-mutou
0a736dd5df Drop py33 support
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3

And already the infra team and the oslo team are dropping py33
support from their projects.

Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.

Change-Id: Ic9d4f64154a5418baa159a4efdcd9dd652d142ff
Closes-Bug: #1526170
2015-12-15 16:26:20 +09:00
Ondřej Nový
6ac9f3a412 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: I22e710aae8bf34938a4f9ee85c566876a36c7bb1
2015-12-11 23:30:05 +01:00
Jenkins
51df01e972 Merge "Remove python 2.6 support from python-novaclient" 2015-12-02 20:43:32 +00:00
Chuck Carmack
81f8fa655c Remove python 2.6 support from python-novaclient
Since oslo is removing support for python 2.6, nova
needs to also remove support from clients and libraries.
This commit is to remove support from python-novaclient.

-- Python 2.6 compatibilty code was removed.
-- Python 2.6 was removed as a tox environment, install venv,
and from the classifiers in setup.cfg.
-- Release notes have been updated.

UpgradeImpact

Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>

Change-Id: I3f587ff38d478d075af5fd014e2b4b8416e185d4
Closes-bug: 1518390
2015-11-30 16:04:24 +00:00
Sylvain Bauza
bb7956bfaa force releasenotes warnings to be treated as errors
Per http://lists.openstack.org/pipermail/openstack-dev/2015-November/080521.html,
we need to make sure that there are no warnings for reno.

Change-Id: I899d223f5347633a17ac5c7fb3991a3cd1f4c781
2015-11-28 00:57:58 +01:00
Sylvain Bauza
3e8cee01d5 Add reno for release notes management
Since reno is the new tool for Relnotes, we need to add it
to novaclient  and provide some Sphinx docs for Liberty and Mitaka.

Change-Id: Ie42642a0e0037311cfa14cd8bf6b7041b62a4675
2015-11-23 21:03:34 +01:00
Andrey Kurilin
6f4f3f40cc Launch functional tests serially
Currently, functional tests are not isolated and each test has access to
resources from parallel launched tests.
This patch is a hack to isolate tests and give ability to create as many
resources as tenant quotas allow.

Change-Id: Idc0a60d350e408bdbd67a7a527698be9f4d6b27b
2015-08-28 18:28:38 +03:00
Joe Gordon
d37c19a13f Add docs tox env
Just like in nova, lets add a 'docs' env to here so you can simply run
'tox -edocs' and build the docs which get published to

http://docs.openstack.org/developer/python-novaclient/

Change-Id: Ie381a78477b60b4b9981576d75c911cb0deb5696
2015-06-04 16:56:11 +09:00
Sergey Nikitin
53f0c5428f Enable check for E124 rule
Fix E124 failures and enable check for E124

E124 closing bracket does not match visual indentation

Change-Id: Iec6af44362dcf613cfaccbccbe53de82aba51a6a
2015-02-27 16:30:03 +03:00
Sean Dague
9a06348f47 add pretty_tox to nova functional tests
debugging tests is a lot easier when you can actually inject stderr
directly through even on successes. Add the pretty tox facility from
nova / tempest-lib into python-nova client as well for functional
tests.

Change-Id: I5c1f8244a5c743b590b74a8eb3eaf4a699555644
2015-02-23 17:22:10 -05:00
Joe Gordon
b89da9be28 First pass at tempest_lib based functional testing
Begin moving tempest nova CLI tests out of tempest and into this repo
using tempest-lib. This patch adds the framework to run the functional
tests, later patches will port the existing tempest tests.

Use standard OpenStack environment variables to get keystone auth

Change-Id: Ie957bd450bfed97b63788cfb488f92988fbbc889
2015-01-28 15:44:43 -08:00
Joe Gordon
7544dcb4ea whitelist find in testenv
Stop logging a warning when running find inside of tox.

Change-Id: I9a79ea62bc85d6a414ef3c6e45a059301a3ea8a4
2015-01-27 12:35:40 -08:00
Joe Gordon
0eb2e72d38 Move to hacking 0.10
Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Explicitly move everything to new style classes (H238).
http://python3porting.com/preparing.html#use-new-style-classes

Remove deleted hacking rules from tox.ini

Change-Id: If65b0060e6f64a456b4869ef4129ad15aef107fb
2015-01-12 09:40:49 +13:00
Eugeniya Kudryashova
1aa020989e Enable check for E128 rule
Fix E128 failures in novaclient/client and
novaclient/shell and enable check for E128

E128 continuation line under-indented for visual indent

Change-Id: Id3ac46ccdbb8a9f97e54b4643240d93b06fac6ea
2014-11-27 14:19:55 +02:00
Andrey Kurilin
3065afd6c0 Enable check for E129
E129 visually indented line with same indent as next logical line

Change-Id: I438bf0d9de7f61ab65e753169c9a8007e84b215a
2014-10-23 14:28:57 +00:00
Andrey Kurilin
ae6c39397e Enable check for E127
E127 continuation line over-indented for visual indent

Change-Id: I9dfd489565ee2d1469b2048a930c3a8384dd245d
2014-10-23 14:28:50 +00:00
Andrey Kurilin
8de2237cc4 Enable check for E126
E126 continuation line over-indented for hanging indent

Change-Id: Id64edce8278d96c1b2d4a6ca536e9fc8fbef478c
2014-10-23 17:28:25 +03:00
Joe Gordon
1adc6d0251 Remove E12* from list of deliberately ignored flake8 rules
I367064ecaa6d1fd9d918f7ce003303e2db660647  Added E12 to the
ignored on purpose list, which also makes no sense E12 was never meant
to be skipped all together (I was the one who added E12 to the flake8
ignore list (Ifc8924914b5a0d625bc8df6442ee85eb21459cde)

Then I4cf246e3ec932ba0d2391eb8bcb793b28b005b4c came along and updated
the list to break out the E12 ignored on purpose list.

Drop all E12 rules from the ignored on purpose list, as we do not want
to ignore these on purpose.

Change-Id: Ic400047347a82aebbc0f6ce6f5061e7757a02d3d
2014-10-20 10:21:20 -07:00
Andrey Kurilin
dc09cf27e3 Port to use oslo.i18n
Module gettextutils from oslo-incubator was graduated to separate
library (oslo.i18n) and removed from repository, so we should use
new library.

Change-Id: I15d36ac5a2bb88b332ffa38d29488b75c55a20a9
2014-10-16 01:19:48 +03:00
Andrey Kurilin
8b8aa499e1 Enable check for E123
E123 closing bracket does not match indentation of opening bracket's line

Change-Id: I3f941032efb5ca2ef9a78f865effbf79c8674ebb
2014-09-24 22:44:20 +03:00
Andrey Kurilin
d05ae5dcc0 Enable check for E122
E122 continuation line missing indentation or outdented

Change-Id: Ic54714142b3c5aded42d544f296b0ef9a840c282
2014-09-24 22:44:20 +03:00
Andrey Kurilin
7fc1588dfd Enable check for E121
E121 continuation line under-indented for hanging indent

Change-Id: I4cf246e3ec932ba0d2391eb8bcb793b28b005b4c
2014-09-24 22:44:09 +03:00
Sean Dague
d96f13d2e2 delete python bytecode before every test run
Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Related-Bug: #1368661

Change-Id: I00ee418eea2d82031bb510b09e63e2ec87fb1b09
2014-09-12 17:37:15 -04:00
Christian Berendt
33058cbe8e Enable several checks and do not check docs/source/conf.py
* E265 block comment should start with '# '
* H302 import only modules

Do not check docs/source/conf.py. The file is imported from the
cookiecutter template.

Documented why checks are ignored and if they should be enabled
in the future.

Change-Id: I367064ecaa6d1fd9d918f7ce003303e2db660647
2014-08-05 22:18:14 +02:00
Christian Berendt
68f357d963 Enable check for E131
* E131 continuation line unaligned for hanging indent

Change-Id: I719d5bcd1b51896c947e637f6dfce2e1f1a6bd2b
2014-08-01 22:39:14 +02:00
Joe Gordon
4d2586716a Enable H233
H233 (and H402) were temporarily disabled as part of the migration to
hacking 0.9. This patch fixes all H233 issues and re-enables
gating on them.

H402 has been removed in hacking
(I9426644fa708e9d5563abe04dc4ad656dbeb3656) so leave this one off as its
going away anyway.

Change-Id: Iae8f132c66c5e345dc2e9c2464f67609887c1475
2014-07-25 19:20:38 +02:00
Christian Berendt
d51b546774 Enabled hacking checks H305 and H307
* H305  imports not grouped correctly
* H307  like imports should be grouped together

Change-Id: I23fdad285508707a2c1d7c832ff8b1a6a10e8f88
2014-07-17 15:31:08 +02:00
ChangBo Guo(gcb)
88d0b6f2d9 Enable F841
F841 detects local variable is assigned to but never used.
This commit fix the violations and enable F841 in gate.

Change-Id: I52419f5e17db70e511ff2d4d61c85458c958e9c3
2014-06-19 09:49:05 +08:00
Jenkins
f44c49d3c3 Merge "Bump hacking to 0.9.x series" 2014-06-17 10:30:42 +00:00
Jenkins
8aec8049b9 Merge "Add posargs support to flake8 call" 2014-06-17 03:59:22 +00:00
Joe Gordon
9f92301983 Bump hacking to 0.9.x series
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future
patches.

Change-Id: Ia3517e705f894b48585b957c21e7a3a6ed90e586
2014-06-16 09:30:52 -07:00
Joe Gordon
b4d0280f03 Add posargs support to flake8 call
Add posargs to flake8 call in tox.ini, with this you can pass arguments
directly into flake8 using the following notation
  tox -epep8 -- --FLAKE8-ARG

This can be used to pass arguments like '--statistics' to flake8

Change-Id: Ia820d62c4a1f428d60d88b04d8a4d9b1442baa09
2014-06-15 23:42:31 -07:00
Sean Dague
9520fbbfea add tox target for python 3.4
Ubuntu 14.04 has python 3.4 so add a 3.4 target. 
Note that this will fail unless
you have new enough virtualenv. Recommend you install the packaged
version of 1.11.4 and get rid of any pip installed ones.

Change-Id: Ib54dc49fca2463f1c5cd788b48d06bd85be52655
2014-06-11 10:45:08 +00:00
Alex Gaynor
cbbfc6904e Removed now unnecesary workaround for PyPy
Change-Id: Id23fdf62352a1575653d2277f7b87d371b0480c8
2014-05-31 21:40:59 -07:00
Kevin L. Mitchell
8c7524b8bf Work around pypy testing issue
A recent release of setuptools appears to have introduced a bug that
causes the pypy gate tests to fail.  This applies a temporary workaround
that should restore pypy testing while the root cause of the problem is
researched.

Change-Id: I66597e40c1d2e57cca1292844d228af85214197d
Partial-Bug: 1290562
2014-03-18 11:37:57 -05:00
Jeremy Stanley
09bef81e9c Remove tox locale overrides
* tox.ini: The LANG and LANGUAGE environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug.

Change-Id: I0f30b45033145c61ad2a9b232cb1178c48c7fc97
2014-02-10 03:21:02 +00:00
Russell Bryant
f6fdff657f Fix python 3.3 unit test job
Change-Id: Ibb253e51ec2412d71d04a1994cef4fb60e77f234
Closes-bug: 1277495
2014-02-09 17:49:29 -05:00