114 Commits

Author SHA1 Message Date
ricolin
46a102c2d1 Add reno for release notes management
Change-Id: I8ffe53af594150529c325814cf55812268193172
2015-12-01 15:04:39 +00:00
Peter Razumovsky
1a972838ba Remove [H405] and [H404] ignoring in tox.ini
Remove H405 and H404 rule from ignored rules in
tox.ini.

Also, fix some new [H405]/[H404] errors.

Change-Id: I71065e2c3c300aa69ce204ee78672b08ca413651
2015-10-12 14:08:16 +03:00
Sirushti Murugesan
3f635a26a4 py34: Get rid of py3-testlist
We're close to the end of porting all unit tests
to be compatible with python34. However, ~8 tests are skipped
specifically in python34 because of bugs mostly in mox3.
Those tests will likely have to be converted to mock in
the future. Note that from now on, every test added will have
to be python34 compatible.

Also, fix __str__ function of ExceptionGroup in test_scheduler.
It intentionally uses str so as to not flatten the unicode
literal in python2.7 and also be compatible with python3.4

blueprint heat-python34-support

Change-Id: Id9b8aa11b17c96895092dd701b761a479df09282
2015-09-22 18:13:29 +00:00
tyagi
f38dc98ffd convergence scenario tests
Adding convergence prototype scenarios tests to run against actual
heat code base.
These tests are not modified and should test the sanity of covergence
implementation.

Change-Id: I69373a423da85f23597623457a7a7f1d5c2b0d2a
Implements: blueprint convergence-simulator-tests
Co-Authored-By: Anant Patil <anant.patil@hp.com>
2015-09-08 09:18:36 +05:30
Pavlo Shchelokovskyy
0bc25c8aa8 Run py34 first in default tox run
this avoids py34 failure in default tox run when testrepository is
not yet initialized (e.g. fresh repo clone).

Change-Id: I95d3590ebd67dc4f2c3a53b3da50a3d3ed481f7f
Closes-Bug: #1489059
2015-09-02 16:39:49 +00:00
Steve Baker
453acc407a flake8 check doc/source
Change-Id: I26001e29a37b340ea8d11d9b054f51f7cd305318
2015-08-27 09:59:25 +12:00
Jenkins
d09533cc8c Merge "Add alternative way to use debugger for unittets " 2015-08-21 15:48:44 +00:00
Sergey Kraynev
d1291a5ca8 Add alternative way to use debugger for unittets
Add description about how to use pdb debugger with new tox option:
"debug". This option was added to tox.ini

Change-Id: I8a8934815eb147b4bb60e4ca2f5177f2e58cce76
Co-Authored-By: Tony Wang <muyu@unitedstack.com>
2015-08-20 16:28:51 +00:00
Wang Muyu
b070ed0286 Improve unit tests to succeed without hash tweak
PYTHONHASHSEED was set to 0 to disable hash randomization, because some
tests assertions were order sensitive. This commit is to improve the
assertions, so the PYTHONHASHSEED hack in tox.ini is not needed.

Change-Id: I4ff09d202af818d27321e8e83718e82d0c48e3d2
Closes-Bug: 1348818
2015-08-19 10:52:08 -04:00
Steve Baker
a5d9000edf Use OS_TEST_PATH for integration tests
This allows the removal of the heat_integrationtests regex, which means
that {posargs} can be specified to run only a single test if desired.

Change-Id: I0724a51960b9137824b139bc1d69b42a9e5d4b9c
2015-08-03 11:00:22 +12:00
Jenkins
e8c661f736 Merge "tox environment for bandit" 2015-07-13 20:29:18 +00:00
Jenkins
e00cc75774 Merge "Add a way to run py34 tests from file" 2015-07-13 01:28:36 +00:00
Sirushti Murugesan
7a7820c4ff Add a way to run py34 tests from file
Also, fix minor flake8 issue related to Long literal.

This should now have the python34 gate job passing.

partial blueprint heat-python34-support

Change-Id: I7f85e7251fc96587df0b43daac202c38542a6f6c
2015-07-09 07:15:37 +00:00
Ryan Brown
5c91051200 tox environment for bandit
Add a tox environment for bandit so it can be run as a gate job
eventually. As-is, there are no high severity issues detected in heat.

Change-Id: Iab098a1d8bac5c95d67e6867ad5249987c3a786e
2015-07-08 09:13:35 -04:00
Jeremy Stanley
6cf53ee55b 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: Ib6b0d476ae1d75ca25ac3737cd83bdd0aa3d94eb
2015-07-03 23:06:00 +00:00
Jenkins
f99df4fc87 Merge "Switch from MySQL-python to PyMySQL" 2015-06-22 10:32:35 +00:00
Jeremy Stanley
f6e34c9017 Switch from MySQL-python to PyMySQL
As discussed in the Liberty Design Summit "Moving apps to Python 3"
cross-project workshop, the way forward in the near future is to
switch to the pure-python PyMySQL library as a default.

https://etherpad.openstack.org/p/liberty-cross-project-python3

Also 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: I17e052215ce6e1604cdda848ccc20862452ccbc7
Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
2015-06-18 18:05:44 +00:00
Tetiana Lashchova
402f41d56f Fix py27log env in tox
Add ^(?!heat_integrationtests) to py27log env to have the same
behaviour as py27 env

Change-Id: If092a56c840d52edd06076256e4832337ddc722a
2015-05-28 16:01:07 +03:00
Sirushti Murugesan
e54dcf95fa Fix integration tests for tox>2.0
Closes-Bug: #1455065
Change-Id: I2e33a2d834dfbef5b3e778757a86a2122d1b1719
2015-05-14 12:04:38 +00:00
Sirushti Murugesan
ddfa636320 Add a py34 env
Adds a new py34 environment in tox.ini which builds off of separate
(test-)requirements-py3.txt files that will just run flake8 for now
and an empty test-file.

partial blueprint heat-python34-support

Change-Id: I5f00a96fc70613ca7014370ec826d0a6a6199fde
2015-05-12 20:25:41 +05:30
Sirushti Murugesan
41349f0456 Run heat_integrationtests in parallel
This should improve the turnaround time of the gate tests and
also make room for more integration tests.

Also, remove duplicate addCleanup.

Change-Id: Iacdd554ee13bb87b0b71ebf547209f94e945f342
2015-05-07 03:53:27 +00:00
Pavlo Shchelokovskyy
f518cfe252 Add separate requirements.txt to integration tests
and use it during tox run. This should speed up the tox venv creation
somewhat, as the new requirements is shorter, thus less packages are
installed or C extensions compiled.

Also this is the first step to ease packaging of the integration tests
as a separate tool.

Change-Id: I914eb675e7f025e03a22719d5dff8ed741fbd37d
2015-04-01 09:02:13 +00:00
Joe Gordon
3eb0fd1771 Move to hacking 0.10
Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Remove deleted hacking rules from toxini (H803)

Change-Id: I97965ec81e6eaf771f74b6044945f23fae395ba5
2015-03-24 11:46:35 -07:00
Sirushti Murugesan
1e72bec19d Get tox to generate config for heat_integrationtests
Change-Id: Ic1ee2a333f4aa25ccdc80ed2fd0a0d4f064bd1d0
2015-02-04 00:01:26 +05:30
Miguel Grinberg
9cd15afe74 Add all dotfiles to the list of pep8 exceptions
This helps avoid bogus errors in third party configuration files such as
those in .ropeproject folders.

Change-Id: I4988b5d5dc150d5ee949266916d0f06a4d4176ce
Closes-Bug: 1414869
2015-01-27 20:27:03 +00:00
Pavlo Shchelokovskyy
cb8712281d Enable H904 style checking rule
Use parentheses instead of backslash for line continuation.

Plus, usage of escaped quotes in long strings is avoided where it makes
sense.

Change-Id: If2e78012b85a4430c6f03f65784cac2d032cf116
2015-01-20 11:14:06 +02:00
Pavlo Shchelokovskyy
4279bd2923 Enable H305 and H307 style checks
Correct grouping and ordering of imports

Change-Id: I47ea0d53f80d7f0aeb01c1c6afd63713be87ddf4
2015-01-20 09:47:25 +02:00
Pavlo Shchelokovskyy
f1b5a782b7 Enable H402 style check
Full stop at the end of single-line docstring.

Change-Id: I9f24dbe0666069800979758d3628ed4f7fc4979b
2015-01-13 11:36:45 +02:00
Pavlo Shchelokovskyy
26117bd9ea Enable H202 style check
assertRaises exception is too broad

Change-Id: I7d4b3da2ce7b2c2bd7e26299dfc9bdda93748382
2015-01-13 11:36:45 +02:00
Pavlo Shchelokovskyy
f034258efb Enable H233 style check
Python 3.x incompatible use of print operator

Change-Id: Ie94bba693f1773930f41fb09efdcfe2f2a7e4a96
2015-01-12 13:48:44 +02:00
Pavlo Shchelokovskyy
2e9fcbba64 Enable E251 style check
unexpected space around 'equals' operator

Change-Id: I8566d918a2abb8cac358832fb5af551fad9b058f
2015-01-12 13:48:44 +02:00
Jenkins
98cfbb9a4e Merge "Enable F402 and F812 style checks" 2015-01-10 12:45:30 +00:00
Jenkins
7d4c4030c5 Merge "Enable E265 style check" 2015-01-08 13:13:14 +00:00
Jenkins
7b8c6a383b Merge "Enable H101 style check" 2015-01-08 10:54:19 +00:00
Jenkins
a205cd4c23 Merge "Enable E122, E126 and E128 style checks" 2015-01-08 07:58:03 +00:00
Jenkins
80d62ecded Merge "Update oslo-hacking and disable failing checks" 2015-01-07 15:50:44 +00:00
Pavlo Shchelokovskyy
fb4f131d84 Enable F402 and F812 style checks
Checks for shadowing by loop variables

Change-Id: I6fd89d34fee35d08b5b15f2ee0015f1ed685f0be
2015-01-05 11:58:27 +02:00
Pavlo Shchelokovskyy
8415baf6cc Enable E265 style check
block comment should start with '# '

Change-Id: Iffae1b10e81b12ca8455139eae609ddca5e8dd09
2015-01-05 11:58:27 +02:00
Pavlo Shchelokovskyy
8f801e29c8 Enable H101 style check
TODO must contain a name in parentheses

Change-Id: Ie535b8aa67403fb05e536af34d7bacfe3f08ce99
2015-01-05 11:58:27 +02:00
Pavlo Shchelokovskyy
9b70d30386 Enable E122, E126 and E128 style checks
Improper indent of continued lines.

Change-Id: Iea32ef7dddb5f75681aa4992d8270391e038a1c8
2015-01-05 11:58:26 +02:00
Pavlo Shchelokovskyy
46e5897c3e Update oslo-hacking and disable failing checks
This also brings in newer versions of flake8, pyflakes and pep8,
with new and updated checks.
Some of them fail on our current code base, so first those failing are
disabled.
Most of them will be enabled one-by-one in subsequent patches.

Change-Id: Ib5fc4640b33c238ddb4e59a441c6710f607296b1
2015-01-05 11:58:01 +02:00
Thomas Herve
ec6ff6f670 Use oslo.config generator
Replace usage of old incubator configuration generator by the
oslo.config tool.

tools/config/generate_sample.sh has been replaced by tox -egenconfig.

heat_integrationtests/generate_sample.sh has been replaced by
oslo-config-generator
--config-file=heat_integrationtests/config-generator.conf

Change-Id: I6d95df203b556c8ec2088d40a446427f7087b9a7
2015-01-02 13:14:20 +01:00
Tetiana Lashchova
475f61fc9f Bring over pretty_tox.sh from nova
- added full log for integration tests by default
- added env 'py27log' which allows to get log for unit-tests

Change-Id: I43ca330c82ffe100247102021fce1f00acb4d11a
2014-12-25 18:00:32 +02:00
Tetiana Lashchova
15777b2973 Fix tox for integration tests
Before providing tox with regex to run specific integration tests
was broken.

Change-Id: Ieed667073fa1ec4eb864e195860266355e6f9d1c
2014-12-22 14:29:20 +02:00
Pavlo Shchelokovskyy
94a7ec73fc Remove *.pyc files on every tox run
As we start actively moving the code around (e.g. for resources
decoupling) stale *.pyc files might lead to cryptic failures when running
tox locally (and not from the freshly cloned repo as OpenStack Infra
does).
tox installs the package being tested in venv using development mode,
thus the actually tested code is from the repo working tree, so it is
beneficial to have it cleaned from pyc files before the test run.
Now removed run_tests.sh also had similar feature, but for DB migrations
only.

The files from .tox dir are left in place, as that might speedup the
tests run somewhat.

Change-Id: I91adfbc806111e2ab023199c5dea1ea7ebeca5da
2014-12-15 10:56:38 +02:00
Jenkins
f8f3871006 Merge "Support tox test case single run" 2014-12-12 11:02:25 +00:00
Jenkins
7479227391 Merge "Stricter complexity checking in tox configuration" 2014-12-12 06:07:28 +00:00
JUNJIE NAN
e00e23604c Support tox test case single run
For example "tox -epy27 -- heat.tests.test_hot.StackParametersTest" will
run correctly with this patch. Otherwise the same command line still run all.

Change-Id: Ib108a6f5c319c3060475a2daa47e8e35441a840e
2014-12-12 11:04:33 +08:00
Jenkins
6a3137de22 Merge "Remove Python 2.6 classifier" 2014-12-10 20:29:43 +00:00
tengqm
354e23edb3 Stricter complexity checking in tox configuration
This is the last patch to fix complexity issue we have in Heat code.

Change-Id: Icefec1b794ef0589d535f944ae5a7605cabe7e8b
2014-12-10 20:26:58 +08:00