79 Commits

Author SHA1 Message Date
Chandan Kumar
4f57c90d69 Remove intree mistral tempest plugin
* https://review.openstack.org/524869 moves the intree mistral
  tempest plugin to a new home openstack/mistral-tempest-plugin
  let's use it.

* It also removed intree mistral tempest plugin as well as fix the
  jobs to use the same.

Change-Id: I28ba8408452637aa093b343441f3715dc4754a3f
2017-12-26 07:49:14 +00:00
Andreas Jaeger
d018cd7788
Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I9298add1f77b56f19f355b19da89f9799d2415c9
2017-12-02 10:43:11 -06:00
Dai Dang Van
49ed570cfe Implement policy in code (1)
This commit prepare for implementing policies in code[1].

Like oslo.config, with oslo.policy, we can define all of
default rules in code base and only change some rules
via policy file. Another thing that we should use yaml
format instead of json format.

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html
Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I2051b6c25333c95aa9ea6786964d4ab710ea93e8
2017-11-27 02:46:32 +00:00
junboli
517f1646d0 Remove build files before run tox doc builder
This may cause build failed if the old build file still existed.
This patch is to remove build files before run tox releasenotes
and docs builder.

Change-Id: Ia36abd03727ff3d71c6c24a71dcd4b5f7dbf9f77
2017-08-22 16:13:13 +08:00
Jenkins
a240e9921e Merge "Fix the pep8 commands failed" 2017-08-10 21:06:13 +00:00
junboli
a2c1db4b14 Add doc8 rule and check doc/source files
doc8 is a linter for documents and used in openstack-manuals. It is better to enforce
document linters for simple checking. This change is to add doc8 in tox file and fix
line too long in some files.

The current rules are as bellow:
- invalid rst format - D000
- lines should not be longer than 79 characters - D001
- no trailing whitespace - D002
- no tabulation for indentation - D003
- no carriage returns (use unix newlines) - D004
- no newline at end of file - D005

Change-Id: Ibba3f0e1c3f724563deb27bbf4f13a8040799687
Closes-bug: #1709571
2017-08-09 16:50:33 +08:00
junboli
f64f6c14ed Fix the pep8 commands failed
* Fix the pep8 commands failed and Enable H904 checks in tox.ini.
* Hacking M331 still has Bug and remove it from HACKING, use H904 instead.

Change-Id: Iaf692bc139b309376917832aaa749cc141c11275
2017-07-27 22:15:12 +08:00
junboli
10814703f2 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I33f4264ddf79067f75cd5ba87ea08286dd957dc2
2017-07-15 05:39:29 +00:00
Mike Fedosin
2cb36cba73 Fix tox
Now 'tox' command fails because it tries to remove
.testrepository as a regular file, but it's a
directory.

Change-Id: I1be468d6074049b7d40610c10904e9795a3759d5
Closes-bug: #1703205
2017-07-09 15:45:20 +00:00
Sharat Sharma
4ccc3aa8a9 Remove .testrepository directory from testenv
Running py2* post py3* tests results in error like:
db type could not be determined
error: testr failed (3)
ERROR: InvocationError: '/home/xxx/xxx/mistral/.tox/py35/bin/python
       setup.py testr --slowest --testr-args='
ERROR:   py35: commands failed

Removing .testrepository from testenv to resolves this.

Change-Id: Icd3e08dc342c2f9c19b39bd7ee9cfbdeff68a370
2017-06-30 13:56:24 +05:30
Dougal Matthews
a4a8e96a97 Force Python 2 for pep8 linting
It will otherwise fail with errors in the tempest tests, as they are not
Python 3 compatible.

Change-Id: I1a023cc58672de2b51da8d30ad621e67d6a93093
2017-05-02 09:04:24 +00:00
Dougal Matthews
28ea6be8df Set the basepython for the venv tox environment
CI uses the venv tox environment to build the documentation. We need to
make sure that Python 2 is used until out docs build correctly under
Python 3.

Change-Id: I1a1d3123f22bf89965eb65e48648aae38cbdd254
2017-04-11 16:11:39 +01:00
Jeremy Liu
97ccad154a Add check for idempotent id in tempest tests
Idempotent id for tempest tests must be unique, as it's used to
trace tests even in the event of refactors. This patch adds a new
check using check-uuid tool from tempest to validate id uniqueness.

Change-Id: I415699d2349ee0c4becfb404c60a06f244f78ba0
2017-04-03 09:42:16 +00:00
Dougal Matthews
b27e78676f Force Python 2 for documentation builds
The documentation will fail to build under Python 3 as some of the
Sphinx extensions are not compatible.

Change-Id: Ifefa59bf9d06d4aa84c0a440d2458cc297a50ec2
2017-02-17 13:20:54 +00:00
Jenkins
b88700cc3f Merge "Remove support for py34" 2017-02-10 13:03:48 +00:00
gengchc2
3ba02abe34 Remove support for py34
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: Ic498801532227421c3247ef66eff11377df47795
2017-02-08 16:09:17 +08:00
Dawid Deja
672f4663b2 Fix for failing gates
We were launching the tests using run_tests.sh
with flag 'V' set, which makes the tests beeing run
in the virtualenv. However, the tests are already beeing run
in virtualenv since they are beeing run by tox. So we
basically made virtualenv inside the virtualenv.

Closes-bug: 1659819
Change-Id: If647e44a43e730f00b01c597cde0c2345f8b780f
2017-02-02 17:15:42 +01:00
Jenkins
c9ef100219 Merge "Add script for unit test coverage job" 2017-01-30 14:53:53 +00:00
Sharat Sharma
e36d7f8af2 Add script for unit test coverage job
This commit will add script and coverage config file that will allow to run
non voting coverage job which will detect any changes in the code coverage
for each commit on review.

Change-Id: I624d1228df0adf1f34a498e5e86b6b092e667f5f
2017-01-23 14:38:15 +05:30
Sharat Sharma
51279dd862 Initial commit for mistral api-ref
This adds the repo for api-ref for mistral api reference. The api
can be documented in the files added.

Change-Id: I624abe6caee01e577ff8cda1660cbd8722856135
Partial-Implements: blueprint mistral-api-ref
2017-01-11 18:19:39 +05:30
tengqm
83e2431b35 Fix configuration generator
The current behavior of 'genconfig' is writing file
'mistral.conf.sample' directly to the '/etc/mistral' directory. This has
two problems: the /etc/mistral directory may and may not exist; we are
supposed to write a usable configuration file into the '/etc/mistral'
directory instead of a sample file.

This patch redirects the output path to the local 'etc' subdirectory.
Developers/users can then tune and install the configuration file based
on the sample.

Change-Id: I0c75ab9ffc9960ba12ce6f5d725c0c7bb78ef238
2016-12-19 07:12:41 -05:00
Sharat Sharma
bdece6e608 Initial commit for mistral-i18n support
Adding the _i18n.py file to use oslo.i18n libraries in mistral.
Also updating the requirements to support i18n.

Change-Id: I942a4f1b4a65a4a607b284dd44be547ae41642ce
Partial-Implements: blueprint mistral-i18n
2016-11-28 17:09:19 +05:30
Sharat Sharma
eaf5058c93 Make CI gate for unit tests on mysql work
unit-mysql tests fail during CI gate job. This patch adds coverage
for the unit-mysql.

Change-Id: I973991f45863a0465950776d66b717c5e6edfbf8
Closes-Bug: #1644444
2016-11-25 18:49:01 +05:30
fengchaoyang
50cb85bd03 Fix the default configuration file path
According to the habit of openstack project, the project configuration files
are generally placed in a fixed directory(/etc/project/project.conf).

Change-Id: I028a5d31e1879c4257aa523df6f56eafdb664e0d
2016-11-25 14:19:29 +08:00
yushangbin
d66f271cad Remove unused pylintrc
We didn't use it in the gate and it's unmaintained. Clean that.

Change-Id: I082659b8715821db9313f70b37dc1f200244c1ee
2016-11-15 01:09:20 -08:00
pawnesh.kumar
6173a03326 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.

Change-Id: Ieb68867726f8959ac5dc0f48fa923281cd2134fa
2016-10-26 13:13:47 +05:30
pawnesh.kumar
474bf2ebc3 Enable code coverage report in console output
Modified tox configuration to enable code coverage report in console output

Change-Id: I058f908058b5e3fe3732a84d5cbfb463c4caab23
2016-10-17 11:13:50 +05:30
pawnesh.kumar
169d983c70 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, so don't use
this directory any more

Change-Id: Id1f9c3eda6a13c3db5173c07f75a4833822631c2
2016-10-09 03:13:31 +05:30
Hardik Parekh
bb257de979 Revert "Update UPPER_CONSTRAINTS_FILE for stable/newton"
This reverts commit 26894df15dd124ce175b2a69a4deee8d7a259603.

Change-Id: I56ad12f96e5c7cdf4080250a1b9bd54caf8a4b3c
2016-09-27 09:50:50 +00:00
avnish
26894df15d Update UPPER_CONSTRAINTS_FILE for stable/newton
Change-Id: Ibe84879a75c54d56f7150d991c2ce6fbbf9c3377
2016-09-23 12:46:41 +05:30
lvdongbing
4ecca5717c 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: Id6080cf39ff5c50bc85b576247822040ccaae445
Closes-Bug: #1614361
2016-08-22 01:59:11 -04:00
PanFengyun
89645ce243 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: I4bc6f28411b4eee1df62a845e70d24c3cfbf500e
2016-07-14 08:35:49 +08:00
Renat Akhmerov
af5975eaf4 Enforcing upper constraints for tox test jobs
Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
Change-Id: Ibe35586272f39d5c0bbf2cd4e3425b5f06e2b6ea
2016-05-21 12:24:35 +12:00
Renat Akhmerov
3e9aa8b310 Fixing a bug in DB API method that acquires entity lock
* Before this change method acquire_lock() would override all changes
  made for an entity by a concurrent transaction when calling
  entity.update() although one line before it should have read this
  entity from DB and update only a timestamp to acquire the lock.
  The solution is just to append "FOR UPDATE" to an SQL statement
  when fetching an entity from DB. In this case we don't need to
  artificially update a timestamp at all.
* Unit test for MySQL or Postgres is currently impossible, all unit
  tests are run against sqlite
* Adding "PYTHONHASHSEED = 0" into "venv" environment in tox.ini to
  prevent sphinx from failing. It should be added to "venv" because
  docs building run with command "tox -evenv -- python setup.py build_sphinx".
* Fixed minor style issues

Change-Id: Ia749f397e18e927820ff7ae6bac7d28dc2aa2ba4
2016-03-28 14:47:09 +07:00
Nina Goradia
fdb24bd697 module docs are not being generated
The pbr section in setup.cfg is not defined, so the module docs are not being
generated. This causes the 404 when clicking on the ‘Module Index’ link under
the 'Indices and Tables’ section in [0].

[0] http://docs.openstack.org/developer/mistral/

Change-Id: I337e9f6e78257a3e8e9222779dfcd600ba6cebd8
Closes-bug: #1558574
2016-03-21 17:27:14 -05:00
hparekh
f9ca1e3c7e Fix db error when running python34 unit tests
If tests for py27 is executed before py34 tests,
then there is a chance that py34 related tests may fail.
The following patch fixes it.
Ref: https://review.openstack.org/#/q/status:merged++topic:bug/1489059,n,z
TrivialFix

Change-Id: I67f4414c6486fecec20d6e52645dc8190c21fc61
Closes-bug: #1489059
2016-01-06 15:06:42 +09:00
hparekh
9b49804d3b 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.

Change-Id: Idecb51c1cfdbfa15729a7a5ccd0a473e9860f1fe
Closes-Bug: #1526170
2015-12-24 16:30:56 +09:00
Jenkins
eeaec7f2ae Merge "Pass environment variables of proxy to tox" 2015-12-11 00:23:08 +00:00
Jenkins
02901ed230 Merge "Ignored PEP257 errors." 2015-12-10 10:20:26 +00:00
hparekh
e0920a4858 Ignored PEP257 errors.
Change-Id: I5846e830cf6771b0e9dbd6f860dd50e87425b0c3
Closes-bug: #1523590
2015-12-09 15:32:26 +09:00
hparekh
7a08be7d88 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 patch fixes this problem.

Change-Id: I65b2d9dbc7fbd883a7c90858bb08056da9d5a14f
2015-12-08 07:57:25 +00:00
hparekh
c47714c759 Delete python bytecode before every test run.
This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: Ia6f81dfd1c6487c293012623a165d9dd474b0f4f
Closes-Bug: #1368661
2015-12-07 18:00:08 +09:00
Dan Prince
97aaaa5c42 Run pep8 on some tools python files
Running pep8 on some of the python files in tools/ would
be useful/helpful during development.

Change-Id: I10e7cf7ca448e7498482bae90aa2255507413fce
2015-12-03 08:42:38 -05:00
Lingxian Kong
fab684d864 Force releasenotes warnings to be treated as errors
See
http://lists.openstack.org/pipermail/openstack-dev/2015-November/080521.html

Change-Id: I73b43e84a0fc996cbda6f91445e161d5cc7fc8c0
2015-11-27 18:16:43 +08:00
Jenkins
37c6d62f49 Merge "Adding releasenotes management to Mistral" 2015-11-23 08:32:03 +00:00
Lingxian Kong
559c440cd8 Adding releasenotes management to Mistral
Please get more information here[1][2] for understanding well about reno.

[1]: http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html
[2]: http://docs.openstack.org/developer/reno/design.html

Change-Id: Iaba8cb4fd2de069debf75ba28977380b6a4cc09c
2015-11-21 00:26:36 +08:00
Anastasia Kuznetsova
dbdc29531c Fix all H405 pep8 errors
Improved code style, fixed all H405 (Multi line docstring
summary not separated with an empty line) errors.

Change-Id: I6639a2e1a9dc5d3802cb1bda05c5bf9b302bc82f
2015-11-16 18:00:18 +03:00
Anastasia Kuznetsova
e882a4f16d Initial commit that fix py34 tests run
Partial-Bug: #1378537

Change-Id: Ib32b66e8e9771bbc9957a4f2489d528aeb3d40d5
2015-09-15 09:57:47 +00:00
zhu.rong
06e7520065 Update the gitingore file and tox.ini
1.update the gitingore file for .swp.
2.delete the no need line before build the docs in tox.ini.

Change-Id: I64b9da411a902a9cedf90d69f59e3d32cc1913e1
2015-08-20 22:05:39 +08:00
Anastasia Kuznetsova
75b1482a9f Fix postgresql unit tests running
- access to the "openstack_citest" db under the "openstack_citest" user
  in case if tests run on Jenkins gate, do not run commands under the
  'sudo' because sudo access is revoked on Jenkins gates
- add one more argument that determines in how many threads tests will be run
  (by default tests will be run in 1 thread, otherwise tests fail because of
   incorrect cleanup mechanism in unit tests)

Change-Id: If332e8661f9309f71a3a0174144026de99df463e
2015-08-12 13:57:28 +03:00