Commit Graph

247 Commits

Author SHA1 Message Date
Stephen Finucane 9a66301aef tests: Enable SQLAlchemy 2.0 deprecation warnings
Well, sort of. We enable them but immediately filter out the ones we're
actually seeing, the rationale being that we can address these in a
piecemeal fashion without the risk of introducing new issues.

There's a lot more to be done here. However, the work done in oslo.db
[1], nova [2], cinder [2] etc. should provide a guide for how to resolve
the outstanding issues.

We also take the opportunity to silence some rather annoying warnings
from webob and oslo_policy that are to be fixed later.

[1] https://review.opendev.org/q/topic:sqlalchemy-20+project:openstack/oslo.db
[2] https://review.opendev.org/q/topic:sqlalchemy-20+project:openstack/nova
[3] https://review.opendev.org/q/topic:sqlalchemy-20+project:openstack/cinder

Change-Id: I666cddbd2aef13c55118ea523b5e40bb924faf15
2024-03-11 13:58:41 +00:00
Zuul 64e0f7c895 Merge "Bump hacking" 2024-02-21 07:40:04 +00:00
Takashi Kajinami 925048f471 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: I8b4f588bfc38aa078bca243ee2ef38f84a92f62d
2024-02-02 23:45:51 +09:00
Takashi Kajinami d8b3f58c0c Bump hacking
hacking 3.0.x is too old.

Change-Id: I2bbe8b45596f4530284e1ba5946fc3fa238649a7
2024-01-27 22:22:47 +09:00
Erno Kuvaja 59a43ef35a Move functional tests to tempest_plugin
Remove pifpaf and dependencies to gnocchi for tox test runs.

Remove redundant gabbi tests.

Move wsme & query unit tests from fuctional to unit test folder where
they belong.

Remove integration tests which has been covered in the new tempest
cases in the depends on patch.

Remove run-tests.sh in favour of just calling stestr.

Depends-On: https://review.opendev.org/c/openstack/telemetry-tempest-plugin/+/901838
Change-Id: I5b33cba27dfcb2bbdf12c9bc6b28ecff9aa18d93
2023-11-28 08:57:16 +00:00
Stephen Finucane 29b88f5db5 tox: Remove unnecessary configuration
tox 4 is Python 3-only. We don't need to configure a basepython now.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I539cdad868fe930a4cf660ed23290b05294292e0
2023-09-21 12:53:04 +01:00
Erno Kuvaja 7ae3fd78c3 Remove "test" extra deps from setup.cfg
Utilizing the "test-requirements.txt" for the test requirements
and building tox 'testenv' with pifpaf and gnocchi rather than
assuming they are actual lib dependencies of Aodh tests.

Change-Id: Ia8bb7c1f17a8090c4932541ac3eed3a8a73f3252
2023-05-10 13:30:51 +01:00
Emma Foley 84d59a1982 Make tox.ini tox 4.0 compatible
* use min version 4.2.5, for fixes [1][2][3]
* passenv fixed as space-separated list is not allowed anymore
* doc target uses requirements.txt as well as docs/requirements.txt
* skipsdist is not supported
* Add usedevelop = False so that aodh-api gets installed

Update setup.cfg: [files] -> [options]

[1] https://github.com/tox-dev/tox/issues/2754
[2] https://github.com/tox-dev/tox/pull/2824
[3] https://github.com/tox-dev/tox/pull/2828

Change-Id: I2422dc17e6c73ef346de80e57cdf61ef5d271d69
2023-01-17 17:03:41 +00:00
Stephen Finucane c8d8001a4f Merge run-tests.sh, run-functional-tests.sh
These were always called in series. No point to maintain the separation.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ic100f380eea90115f0a44a82d1d28d5d216bed68
2022-03-23 10:25:53 +00:00
Stephen Finucane 63c3466f29 Migrate to stestr
This is effectively os-testr but maintained.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I97183318f715b03f31145fa3d0f00bb7bc8a0c82
2022-03-23 10:23:00 +00:00
wangzihao 42c078247b Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I0968c6740ccb96d93527ba368eebe3e56e4e043f
2021-06-29 10:10:24 +08:00
songwenping ce0954c8e7 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update this at
each new cycle.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Id4acb623ef216249385e8020ca9ca1ec68e987a8
2021-04-20 02:47:08 +00:00
Matthias Runge d587a9e56c Use python 3.8 for tox
Change-Id: I2fd374514fd6bf3be02191b7a23b50b6dec93e08
2021-03-04 22:33:34 +01:00
wu.shiming 2710b6000d Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I9a31e347bc3a2b78b9b3e6b205f48da3131803d1
2020-12-14 17:51:30 +08:00
Andreas Jaeger 54f2eb0904 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Use newer openstackdocstheme and reno version
- Update hacking version to 3.0
- move python3 setting into toxenv, remove install_command and
  move constraints into deps

Change-Id: Ibb42f8199eb4ca93e438e5e7ef5d4c4e0b35a738
2020-04-13 18:04:34 +02:00
Andreas Jaeger e71c636dfa Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: Ia621c3fea2b8ded8df7727c07931ad071a61e736
2020-04-03 13:59:31 +02:00
Ghanshyam Mann 95c2b51463 Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Aodh is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal - https://review.opendev.org/#/c/691178/

Change-Id: I12158c5f382f832da50d5be90906ca4a7dd8ccdc
2019-10-30 07:21:50 +00:00
pengyuesheng 670267b960 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ia3ab1f30eff941a6b15f5c01f53c7b634bc19cbf
2019-09-20 16:28:53 +08:00
zhurong 28f7d804e8 PDF documentation build
Change-Id: I98f6a8dcfd434fbbd519dd0ab76ebf5d89fee4b8
2019-09-19 01:55:54 -07:00
Corey Bryant c45127a5c1 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ife7bbcb1f5d4f766ebf9470e252a8c0cf520ee16
Story: #2005924
Task: #34251
2019-07-05 16:29:29 -04:00
ZhongShengping bb27689e6d Add install_command in tox.ini
Change-Id: I2b0c8a0da3485bd64c5fcb8c80aea63ef8982c97
2019-04-22 14:27:52 +08:00
Ghanshyam Mann 33f5ea37f1 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: If5119930dbdbc3366a330929e2328b96a00c6fe7
2019-04-15 01:45:46 +00:00
Nguyen Van Trung a89016706f Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more details information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I28b26e9fa38c2ef854cc5f84e00b4f50ad55394d
2018-07-18 08:40:33 +00:00
Doug Hellmann ed99254573 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I8049df0d8241271122c0587b639c135836846827
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 16:05:56 -04:00
Luong Anh Tuan ae85478479 Enable more extensions pep8
This patch enable extensions:
	# [H204] Use assert(Not)Equal to check for equality.
	# [H205] Use assert(Greater|Less)(Equal) for comparison.

Change-Id: I376f2b4e2991f7e29e743bcd1550b9945591a50b
2018-02-13 01:55:11 +00:00
Andreas Jaeger 5bd747b888 Fix releasenotes builds
The updated releasenote and requirements jobs expect requirements for
docs in one of the requirements files. Move requirements from setup.cfg
to doc/requirements.txt file.

Update also releasenotes build to use same command as in jobs - build
with warnings as errors.

See also
https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation

Fix failure of building with warnings as errors:
Replace the instructions for querying for release notes for newton
with the results of a reno report because some of the broken release notes
are on branches that have been closed and we have no way to edit them.

Depends-On: I994aa3cf173ec8a9412239544e3269aca17adc25
Change-Id: If8df8a6e8cad2d9247f07c9ed7a71f29b19f7d51
2017-11-22 20:35:32 +01:00
Rocky 888215aca8 Add tox whitelist_externals
Change-Id: I15303005e68e1a4d70ee2c7fd082686d8f82f844
2017-10-14 11:03:40 +00:00
gord chung 6005f80f9b fix gate
new ostestr is different and is breaking gate. i don't think we
really need ostestr since we don't use it in any of the projects
under Telemetry. so to remain consistent and simple, just follow
similar pattern.

Change-Id: I742de2107cf56ef8b223fa1431529e706cc52377
2017-09-11 17:21:06 +00:00
Jenkins 990414712f Merge "move install-guide under install dir" 2017-07-13 17:53:12 +00:00
Mehdi Abaakouk 3b365a1876 tests: rework functional live tests
This allows to run functional live tests without devstack.
And runs tests within the normal tox target without devstack

This increases test coverage because all backend are now tested.

Change-Id: If475b6d1f43a44540f276209a3651e7e790c2233
2017-07-13 12:57:41 +02:00
gord chung 0bdef603c9 move install-guide under install dir
Change-Id: I2571feb78d1793f1e03539b568ed49f2fe01c93e
2017-07-12 11:54:39 +00:00
Jenkins 2fd66c3734 Merge "Remove genconfig tox target" 2017-07-12 06:28:46 +00:00
lingyongxu f4faf2a869 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: Ic641fcc099ce51ee4c03b0ce17a6f57d326dfd3f
2017-07-06 09:03:02 +08:00
Julien Danjou 6e0179da3a Remove genconfig tox target
Change-Id: I9e08334bff9d4fc5cc01cf2f4eae26fa7e6e302d
2017-07-05 16:03:07 +02:00
Julien Danjou e11d5f0f00 Add `aodh-config-generator' tool to generate sample configuration file
This makes sure our etc/ folder is now empty by default.

Change-Id: I2b9059449ae50b9440f712e064937e2191e25a8f
2017-05-02 14:23:25 +02:00
Mehdi Abaakouk cf15d5a9de tests: simplify tox config
This runs most of the functional tests in the normal tox target.
(all except those tagged live).

Change-Id: Icf69ff743ba223c1b08abe858f567babfaaa64cf
2017-04-28 20:08:02 +02:00
xhzhf 62c65c984e Install test dependencies in docs
Otherwise there are 40 warnings about missing deps when executing
"tox -e docs"

Closes-Bug: #1665823

Change-Id: Iaec22c41c25d5f2817e8fc7935fab0dfd95d5ce2
2017-02-18 13:19:10 +00:00
liusheng 0a2413dfab 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: I9dbe27b9f471f280f7b876f4262007a20c831ef9
2017-02-09 10:27:57 +08:00
Kevin_Zheng 5df34a8263 Enable coverage report in console output
Enable coverage report in console output

Change-Id: I9f61f7547ceea0ab6472c58e83ad8ea29e1429e1
2016-12-30 16:53:14 +08:00
Tony Breeds 30ee8640ce [doc] Note lack of constraints is a choice
Change-Id: I7af174a6b90a710ae7f6e60ab16fbb3768a2d01e
2016-12-21 09:42:06 +11:00
Julien Danjou 0e49f8864c Bump hacking to 0.12
Change-Id: Ic6865a2f434774ad23fc637bef77c33f9db12998
2016-11-07 22:13:33 +01:00
Julien Danjou 4570e42803 Remove deprecated non-SQL drivers
Change-Id: I1eb890fe422718e986bb92139a023868bace7d96
2016-10-13 15:21:58 +02:00
Hanxi Liu 4aa1bce505 Delete openstack/common from the exclude list of flake8 in tox
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: I3ab5e9a9c3aad923cd4772cb060a1c6d98f0ee4f
2016-08-02 19:51:07 +08:00
Julien Danjou 417c0af49d Add Python 3.5 classifiers for Aodh
Change-Id: I3f10ff34922ce32c34becfcc9d0f4a15f33a66e8
2016-07-18 17:46:41 +02:00
Ildiko Vancsa 1c3e14665c Add install-guide for aodh
This adds heat-specific contents of the OpenStack Installation Guide
in the aodh repo per [1]. A separate change will remove the aodh
contents from the OpenStack Installation Guide for Newton per [2].

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

Also adds tox.ini environment for install-guide.

[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/

Partially-Implements: blueprint projectspecificinstallguides
Change-Id: Ib72b57f9422564c49bf8f24f94f4b76f335e7495
2016-07-04 18:47:50 +02:00
Julien Danjou 467a0418c8 Replace overtest by pifpaf
This is new and shiny!

Change-Id: I5ccc576211a0c49b65a07cc4054a2d039bd4d5d5
2016-05-27 21:03:20 +02:00
Jenkins bcaee09b9e Merge "Update to hacking 0.11.0" 2016-05-12 14:10:04 +00:00
Julien Danjou 8e72117c68 Update to hacking 0.11.0
Change-Id: I69f38ad4844e391ac9fdf5a0655cfef7925686cb
2016-05-10 17:07:35 +02:00
ZhiQiang Fan 229d35adbd move aodh-config-generator.conf to etc/aodh dir
This will allow package or devstack to install
aodh-config-generator.conf under /etc/aodh, which enables end users
run ``oslo-config-generator \
--config-file=/etc/aodh/aodh-config-generator.conf \
--output-file=/etc/aodh/aodh.conf`` to generate a sample
configuration file.

Change-Id: Ib7986d689386d2f44f72754661e328967d94e88d
2016-05-10 19:22:22 +08:00
ZhiQiang Fan 9a307a811a remove todo for OS_TEST_PATH
now we have set OS_TEST_PATH for all

Change-Id: If0aa151db6a9aaac5863266ef779902e4ec4e331
2016-04-23 12:29:26 +08:00