154 Commits

Author SHA1 Message Date
Doug Hellmann
337d83ccde add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I72fd5f8c87133713cd272de210b7e957880f48f9
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 12:40:31 -04:00
ricolin
e82bb7f330 Create doc/requirements.txt
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

Refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124815.html

Change-Id: Ifdfdaacad8574fcfcac9c1b52b0bed6fed4f8411
2018-03-16 00:38:09 +08:00
rabi
f91686c3a7 Fix coverage run with tox -ecover
We removed .testr.conf in 93746a9b2895d44fd105ba26ae77ddffbe2db167
and tox -ecover fails with error.

Change-Id: I31b00afffe38ab5c7591ba54c959349716df7c48
2018-02-07 12:50:07 +05:30
Zuul
04be5a736e Merge "Remove CloudWatch API" 2018-01-31 19:29:03 +00:00
rabi
6d55417f80 Remove CloudWatch API
This patch removes the API, the next set of patches in the
series would remove stack watch service and related
WatchRule implementation.

Change-Id: I8b0472be862907298c8da51f435b5d8b19610ec3
Partial-Bug: #1743707
2018-01-28 09:11:17 +05:30
ricolin
41cc012b34 Allow run tests for both tempest plugin and regression tests
Regression tests will be maintained in-tree. See categries list:
https://etherpad.openstack.org/p/heat-integration-test-categories

We will seperate tests to tempest plugin or in-tree base on conditions
of each tests. So we need to rework on framework for integration tests.
This patch propose following changes:
* This partially reverts commit fff6518e69d19c7946942d1bd7c68e2b76c15966
* Allow running heat tempest plugin and heat regression tests.
* iniset configs to both heat_integrationtests.conf and tempest.conf

Change-Id: Ief31dc961bc108e2863119598dfb16581a38e9cf
Depends-On: I5e9325766ce166e62c731330c462c030cb1e11fc
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
2018-01-19 13:26:25 -05:00
rabi
93746a9b28 Use stestr for unit tests
Change-Id: Ifaf3991e1c9400683e9c98185b86cb39ac3d318d
2017-12-15 12:39:37 +05:30
ricolin
b171490450 [policy in code] Part 1 Base framework
This adds the basic framework for registering and using default policy
rules. Rules should be defined and returned from a module in
heat/policies/, and then added to the list in heat/policies/__init__.py.

new policy wrapers `registered_identified_stack` and
`registered_policy_enforce` has been added for policy enforcement of
registered rules with same parameter as `identified_stack` and
`policy_enforce` besides set `is_registered_policy` flag to true.
This flag will decide to use new policy framework or not.

Now we can use `tox -e genpolicy` to check and generate policy file.

Change-Id: I7a232b3ea7ce0f69a5b7ffa278ceace7a76b666f
Partially-Implements: bp policy-in-code
2017-11-21 16:23:11 +08:00
yushangbin
bcc6000093 Remove install-guide env which is no longer effective
The install-guide directory was moved to doc/source directory when
migrating docs.

Change-Id: I312c45314f4e6e86a7f7b74f747eb0bed6d60759
2017-07-31 17:01:11 +08:00
ricolin
d9df974d7d Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example).
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.
If we didn't setup this variable, the default action will be not
showing any python deprecation warning.

Change-Id: I78d1c68e51ee0833fd1ff0e9548c41bb9d1239a8
2017-05-17 05:22:45 +00:00
Ihar Hrachyshka
3ae6afa449 Remove subunit-trace fork
This makes tox use the latest version of the tool from os-testr repo,
which contains some valuable changes, like the one making the gate fail
if for some reason no tests are executed because all of them are
skipped.

Change-Id: If88be4b310d746ccc885e3d0c1db8a4dfabb2a28
2017-04-06 11:42:05 -07:00
Jenkins
7c908e220d Merge "Remove bandit.yaml in favor of default config" 2017-03-20 16:29:11 +00:00
Jenkins
df0df78975 Merge "Fix api-ref build with Sphinx 1.5" 2017-03-17 10:10:01 +00:00
Eric Brown
dc5cf45d4b Remove bandit.yaml in favor of default config
Latest g-r version of bandit does not require a bandit.yaml. This
removes the bandit.yaml and skips the same tests that were not
run as defined by the profile before. This patch also puts running
of bandit within the pep8 testenv, consistent with other projects.

Change-Id: I7db8bc460e2051c635dc7b3fd4b152ece80c7a0c
2017-03-10 15:35:48 -08:00
gengchc2
21bf937a4b Remove support for py34 for heat
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: Ic7b3fb3ff7b68cf280e36335aa9cacd644cc877a
2017-03-10 06:22:01 +00:00
Andreas Jaeger
6529a2ebd7 Fix api-ref build with Sphinx 1.5
Sphinx 1.5 is more picky about some code, it complaints if code-blocks
are not valid json and also about too short underlines.

Fix one json file, fix underlines, change code-blocks to none so that
Sphinx 1.5 builds this again.

Enable treating warnings as errors to avoid regressions. Note that with
current tools there are no double stanza warnings anymore.

Change-Id: I58d1452ffddf091d56dcfad8140caba084800a0e
2017-03-07 09:34:00 +00:00
Zane Bitter
6555455cbc Revert "Using os-testr to get better report"
This reverts commit d7f2d4f23eba13eea6c314bf5fde34df7a4df912.

ostestr spews what is IMHO an unmanageable amount of mostly worthless data when running tests - at least one line per test, of which there are 6351 at last count. There doesn't seem to be an option to quiet it down, so just revert it.

Change-Id: I7b12dc249e3e7041ab6f0ef36b3e5f0b082aeb7d
2017-02-20 20:51:24 +00:00
Aaron-DH
d7f2d4f23e Using os-testr to get better report
As a wrapper of testr, os-testr uses subunit-trace
for output and builds some helpful extra
functionality around testr

Reference link:
http://docs.openstack.org/developer/os-testr/index.html

Change-Id: I5eb1ea062334c06f5e95ef54367e427b98a17bac
2017-02-17 13:17:21 +08:00
Jenkins
8b7691bb8f Merge "delete python bytecode including pyo before every test run" 2017-01-31 05:20:10 +00:00
liusheng
24d820dc25 Enable coverage report
This change can help to print the coverage report when run
"tox -ecover".

Change-Id: I605ca939672018caabe7916c1fecf4086e8997b7
2016-12-30 16:56:00 +08:00
Jenkins
5902638d79 Merge "Use upper constraints for all jobs in tox.ini" 2016-11-22 11:22:47 +00:00
pawnesh.kumar
98f2372937 Don't include openstack/common in flake8 exclude list
The directory openstack/common was used to keep codes from
oslo-incubator, we have retired oslo-incubator in following patch
https://review.openstack.org/#/c/297487/
so don't use this directory any more.

Change-Id: Id20b9cb8cd63e018a2f566cb12600b8f9e518665
2016-11-09 10:57:14 +00:00
Prince Katiyar
728646e165 delete python bytecode including pyo before every test run
Change-Id: Ie0ba4d6243421ccfd63d75817a37bda78564baa5
2016-09-16 12:32:23 +05:30
AvnishPal
cfb07cb459 Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: Ideae3fdbac5cd08bacad243302e6f8096346b4e0
Closes-Bug: #1614361
2016-08-22 15:24:32 +05:30
Steve Baker
fff6518e69 Run heat_integrationtests as a tempest plugin
completes blueprint tempest-plugin-support

Change-Id: I0109e68bb135cd257e2fff74e75575a7e2f91539
2016-08-13 09:53:07 +12:00
Steve Baker
2af6c6ffdc Do not use env var conf defaults
Falling back to environment variable credentials is convenient for
development but could lead to unexpected credentials being used during
tests. Also this is not a known practice for tempest tests.

This change removes the env var defaults and explicitly sets the
credentials to use in prepare_test_env.sh.

Pre and post grenade tests also get their config from the conf file
rather than the environment.

blueprint tempest-plugin-support

Change-Id: Icf9fb4c58ed11483106c2b62d1e1093223f7dc51
2016-08-13 09:52:41 +12:00
Steve Baker
d21be7dedc Depend on tempest in test-requirements.txt
This replaces the requirements.stub dependency approach for
heat_integrationtests with a single dependency on tempest in
test-requirements.txt.

tempest provides all the required dependencies for the current
heat_integrationtests, and this helps the transition of being able to
run tests both with the current runner and as a tempest plugin.

blueprint tempest-plugin-support

Change-Id: I6fc5886feec5de71826f640cd29990114bd7781c
2016-08-13 09:51:11 +12:00
Jenkins
b83f05ccfa Merge "Always use upper-constraints" 2016-07-29 17:18:45 +00:00
PanFengyun
d0f72accf2 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: Ie64b63a462ae9b2c25ce9ab9e05259350353522e
2016-07-28 13:59:38 +00:00
Ethan Lynn
2e6ce70695 Always use upper-constraints
This patch modify tox.ini to always use upper-constraints.

Change-Id: I113dd658afebe843db304be6cbc4b1ec5df5d248
2016-07-28 11:17:50 +08:00
Jenkins
7c589c720b Merge "Let setup.py compile_catalog process all language files" 2016-07-01 09:23:44 +00:00
Petr Kovar
3a93b123ac Add install-guide for heat
This adds heat-specific contents of the OpenStack Installation Guide
in the heat repo per [1]. A separate change will remove the heat
contents from the OpenStack Installation Guide for Newton per [2].

The heat install-guide structure is based on Install Guide
Cookiecutter [3].

Also adds tox.ini environment for install-guide and adds
openstackdocs-theme to test-requirements.txt.

[1] http://specs.openstack.org/openstack/docs-specs/specs/newton/project-specific-installguides.html
[2] http://specs.openstack.org/openstack/docs-specs/specs/newton/installguide.html
[3] https://review.openstack.org/#/c/314229/

Change-Id: I153b27dd17e5a22224bda473b19dbd76ca0cdc98
Partially-Implements: blueprint projectspecificinstallguides
2016-06-07 17:31:20 +00:00
Sven Anderson
1d8a6a9632 Let setup.py compile_catalog process all language files
Two years ago the translation files have been split into several
files, separating the log messages of different log levels from each
other, like X.pot, X-log-warning.pot, X-log-info.pot, and so on.
However, the setup.py command `compile_catalogs`, that comes from the
babel package and compiles the corresponding .po files into .mo
files, only supported one file per python package.  This means that
during packaging `compile_catalogs` never compiled the X-log-*.po
files, so the corresponding translations were always missing.

Since babel 2.3 the domain can be set to a space separated list of
domains.  This change adds the the additional log level files to the
domain list.

The obsolete check that .po and .pot files are valid is removed from
tox.ini.

Change-Id: I4d05c98b8ddd1a8416d7e0bc0298e86a0adc77d8
Closes-Bug: #1536226
2016-05-20 18:26:07 +02:00
Jay Dobies
4170566618 Migrate API documentations into the Heat tree
For more information, see:
http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

This is the initial port from api-site. The includes in
source/v1/index.rst are alphabetized, but we may want to revisit that
and reorder them according to importance.

Change-Id: I6f578107e17d3a97e667f645a05493da12ae2048
Implements: blueprint api-doc-migration
2016-05-04 15:46:28 -04:00
Jenkins
11c486d9f2 Merge "Pass environment variables of proxy to tox" 2016-04-04 13:03:52 +00:00
Pavlo Shchelokovskyy
dd50ac6352 Create integration tests requirements on the fly
The problem of integration tests was that they use their own
requirements.txt that is unable to auto-sync with global requirements.

This patch removes dedicated requirements.txt and replaces it with a
stub file listing names (and possibly versions) of the packages needed.
Then a special script parses this stub file, and for every package
that is present in main project requirements files it pulls the versions
from main project requirements, generating and installing requirements
for the integration tests on the fly.

This will help keeping requirements for the integration tests always in
sync with main project requirements.

Change-Id: Ie79338cc10cc101fbf15b51c7923e3a7b8e4fbb4
Closes-Bug: #1490866
2016-03-25 13:40:50 +00:00
zhangguoqing
2ef91a7e77 hacking log warn
LOG.warn is deprecated in Python 3 [1], so add hacking warn.
[1]https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I95aa121c2b11437a086d7f8bee25ffa956dd3e4f
2016-03-18 23:00:14 +08:00
Peter Razumovsky
874a9ba7da Implement custom guidelines
Implement custom guidelines for next cases:

 * resources descriptions
 * properties schemas descriptions
 * attributes schemas descriptions
 * methods descriptions
 * trailing spaces in attributes and properties
   descriptions

Also, enable custom guidelines check in pep8 checking.

implements bp custom-guidelines

Change-Id: Ic7b1061abfb42880c476602edb45bc40da291eb0
2016-02-19 18:37:59 +03:00
Bo Wang
cad6597ff3 Enable pep8 to check files in directory tools
The directory tools is exculed for runing pep8 test now. This code was
merged before file subunit-trace.py adding into tools/.
Enable pep8 to check files in toos/ since there will be more python files.

Change-Id: If3b7d9891fa235d690e74dbe91d8e4112d7de17e
2016-02-01 19:54:24 +08:00
chen-li
f2bf26581f Pass environment variables of proxy to tox
When a development environment is under a proxy, tox is failed
even if environment variables of the proxy are set. This is
a new feature above tox 2.0, you can check it from [1].

This patch fix this problem.

[1]. https://tox.readthedocs.org/en/latest/example/basic.html#passing-down-environment-variables

Change-Id: I15615bd3e789a580e3f25f25228851b78197e7a7
2016-01-13 18:08:26 +08:00
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