Commit Graph

47 Commits

Author SHA1 Message Date
Jonathan Rosser e3708903c2 Cleanup setup.py config
Change-Id: Ifef39d280e86cef9a45defe23e2a48bd5c6ce0a3
2022-04-04 10:37:10 +01:00
likui 6d2b8b8de3 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: I572854e4b001fbf559718c785f886590df1dd225
2021-07-03 21:15:31 +08:00
zhoulinhui ceca1dc8ae Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I0aa5797565d01684e436a6d68c11135678aa6721
2020-11-10 13:11:38 +08:00
melissaml 5b49a43254 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
- Remove obsolete sections from setup.cfg
- Cleanup doc/source/conf.py to remove now obsolete content.

Change-Id: Id6489c0f4931ee0ccbec79754aafe77aea05bd35
2020-04-14 16:40:41 +08:00
Ghanshyam Mann 0723127e22 [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

Only update required is in tox to define common baspython as py3 os that
all tox env including [testenv:functional] will use py3 instead of py2.

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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I5a61b93aa3c916ee71ac29e6b68baa40c56fb910
2020-03-01 16:03:46 +00:00
jacky06 3ab507d52f tox: Keeping going with docs
1. Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
2. Remove the unnecessary blank line for tox.ini

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Depends-On: Ie837d376bb1a1d93367369d25140dd8a9d5ac14e
Change-Id: Iee12718e50e922b4070c48944f020603a5ec0fc6
2019-10-24 00:04:40 +08:00
Dmitriy Rabotyagov 402f4f43f4 PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:

  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.

Change-Id: Ic5799f9d176acc0dbe87a1f1bdd984ba8b14ec0c
Story: 2006105
2019-10-18 14:32:34 +03:00
chenke 74fee6e786 Switch to the new canonical constraints URL on master
Reference:
1. http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ib9ffa6c270091cb438c8e25af5026a7d2d6a1e9a
2019-06-20 21:44:12 +08:00
huang.zhiping 2e783371d7 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: I6e8c0d17fb96e507547b61d1d8523b259d1fc204
Closes-Bug:  #1801657
2018-11-08 13:41:40 +00:00
Doug Hellmann 5d28719baa 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: I04a17d27d519c1464e54e7d444a354ab20708960
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:03 -04:00
Jesse Pretorius 939df55739 Clean up role tests
Now that we're using the general templates, we can slim down
the role test definitions. We can also remove tests which are
not being watched, or which are fundamentally broken. With
this we can also remove unused scripts/plays.

We do the following:

1. We remove the 'ssl' job, given that the person working on
   that is no longer doing so, and no-one else has picked up
   the work.
2. We remove the 'upgrade' job, given that it's been broken
   all cycle due to the way the job executes and we need to
   regroup to figure out another way to do it.

Change-Id: I28ff7b95d3b2cc064c59c9966e9c25c7ad9184da
2018-09-16 03:38:08 +00:00
Zuul 1a28d7af4e Merge "fix tox python3 overrides" 2018-08-28 06:21:53 +00:00
Jesse Pretorius bad134fb30 Use the TESTING_BRANCH env var for constraints
The TESTING_BRANCH environment variable is provided by the
run_tests.sh script and is derived from the .gitreview file.

This ensures that once the master branch becomes a stable
branch, the constraints from the stable branch in the
integrated repository will automatically get used once the
.gitreview file is updated.

To ensure that the required environment variables are present
we export them appropriately in run_tests.sh and modify the
tox configuration to pass them into the tox test.

Change-Id: I73aad28af0c7c96270584f279769dc83ddcb3dcc
Needed-By: https://review.openstack.org/579371
2018-08-16 15:41:15 +01:00
melissaml 28d2602649 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: I7858563bbac2cf74bb10c3af5d0809fac0e4920f
2018-07-23 18:27:56 +08:00
Heba Naser 17c516700f Use tests repo for common role test requirements
Using tox for requirements management requires in-repo
requirements files for all our repositories. Rather than
do that, we make use of the tests repo to capture our
common requirements and use this to install them.

This reduces our review requirement rate and simplifies
maintenance for us for the tox config. It also makes it
usable with 'Depends-On', which is marvellous!

The tox requirements definitions for docs/releasenotes
builds are left in-place as those are standard entries
across the community. If that changes at some point, we
can re-assess those entries too.

Depends-On: https://review.openstack.org/579208
Change-Id: I8e27ef6907120e177957edf2d1d6162fb5e0ff69
2018-07-02 10:31:39 -04:00
Markos Chandras 8142383eff tox.ini: Use common vars file for distibution installations
Change-Id: I38b144171d3191953d3bd3e2f28c3ca493c21527
Implements: blueprint openstack-distribution-packages
2018-06-24 16:23:49 +00:00
Markos Chandras ba7c1e29d9 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Change-Id: I4ff3cbf5e1e1ce04cd4cdc9c1ce97afdeace5159
Depends-On: I5a78e2120e596d36629b4ba978b2b5df76b149b0
Implements: blueprint openstack-distribution-packages
2018-05-04 17:08:45 +01:00
Jesse Pretorius 2dfef9c0a3 Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: Iafee46b7293a82f0c9715603be76658a181898db
2018-03-28 10:13:26 +01:00
Jesse Pretorius b5236e0ebc tox.ini: Expose USER environment variable to execution environment
In order to allow the use of the environment variable which informs
Ansible which user executed the playbook, we pass the USER env var
into the environment that tox builds.

Change-Id: I95706352922917393cde0c002773a546e3fd017c
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:58:22 +00:00
ZhongShengping 6928a6d588 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 detials information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I58ea675ad7fc546de84ccfc915c4892eab59d782
2018-03-09 12:01:26 +08:00
Jimmy McCrory 198acc08aa Add MySQL connection SSL support
When 'cinder_galera_use_ssl' is True, use an encrypted connection to
the database using either a self-signed or user-provided CA certificate.

A new non-voting test has been added to verify that the role remains
functional when enabling SSL features.

Partial-Bug: 1667789

Change-Id: Ifeda0acb4b70ba313e6572c806125d31ab3eb300
Depends-On: I95cc994df5118fce7ce588fc0bff979bc283a6f3
2017-12-18 15:01:59 -08:00
Jesse Pretorius f80cb683b3 Ensure that role tests pin pip/setuptools/wheel
Currently the role tests use whatever versions of pip,
setuptools and wheel are already installed on the host.

When a version of these tools changes it often causes
problems for our testing.

This will ensure that we use a known good set of pins
which is maintained in the general SHA bumping process.

Change-Id: I82d501f836750fadd943c7d9c488b949907a1f11
2017-06-04 11:20:07 +01:00
Jesse Pretorius dd95023b8a Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Change-Id: I0cd0a96c5a22837f854c350985fd9b6ede2ca9cc
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 17:41:58 +00:00
Andy McCrae beba04141b Split out cinder upgrade into it's own script.
This will separate out the runs so that variables and modules are not
re-used across runs - ensuring the latest modules and versions are used,
and ensuring multiple versions of the tests playbook aren't required on
non-upgrade runs.

Change-Id: Ie1885ae20a87f27805d3e0c92adba16510c71b1c
2017-02-17 17:01:35 +00:00
Cao Xuan Hoang 544f5f2c5a Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I4146b3a521dd51a60d790d1b129f1cb44bf029e4
2017-02-06 16:24:54 +07:00
Andy McCrae 27221f75a7 Split upgrade test into its own play
To avoid requiring all the os_previous_cinder tasks to be evaluated, we
should split the 2 tests up. This will help make the gate more efficient
and avoids unnecessary issues.

Change-Id: I861764c498618cf644c06b212cf789fe8aa6b3d4
2017-01-20 16:36:21 +00:00
Andy McCrae 9a3f20f3cb Fix tox.ini to work with ansible 2.2.1.0
Ansible 2.2.1.0 requires included vars files to exist even if the
task/play that includes the file is never run (based on a conditional).

This patch fixes that by ensuring the "upgrade" previous version of
test-vars is fetched for every test.

Change-Id: I5b2be1436c9bc59ee4ebb5052ce8c3bafcc65f7a
2017-01-18 17:31:20 +00:00
Andy McCrae 1c9bcb9b4e Cinder upgrade testing.
Implement upgrade testing for os_cinder role.

This patch adds an upgrade testenv, which configures a previous version
of Cinder, and the test-vars from the previous stable branch to be used
by the previous version of Cinder.

We don't run functional tests after the initial stable/newton deploy
because a working stable/newton branch is already tested, and it's
assumed it worked if the upgrade works too - which is more
efficient.

This follows the pattern setup for Keystone in:
https://review.openstack.org/#/c/384269/

Change-Id: I674fe8cefac6f487c766d51f874f1b43468cdaaa
Implements: blueprint upgrade-testing
2016-11-22 11:04:27 +00:00
Jesse Pretorius fd6239a594 Use upper constraints for all tox targets
With the implementation of https://review.openstack.org/388087 all
tox targets may now use upper constraints.

Change-Id: I2ed385bfd65aac8533f350968fdf71f10618d633
2016-10-19 07:41:59 +01:00
Jesse Pretorius d1559a43ea Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

The unused and empty tests/cinder-overrides.yml is
removed.

Change-Id: Ibb811774e5b2b87d2bb41b4c2290c3d8ef4d81e6
2016-10-05 17:57:10 +01:00
Andy McCrae 660c5b8bae Standardize the testing for Cinder
This PR standardizes the testing around the central tests repository:

* Removes the install-cinder and prepare-vg playbooks
* Moves the inventory settings into host_vars
* Adjusts the "bridges" settings
* Standardize IP addresses on the 10.1.1.0/24 range

Change-Id: I91c8079b033bb83e0175a3ab4b1c020a8df4a0db
Depends-On: Ibe2bcd91af9eac099e86e92f9294ed04fffe7b95
2016-10-05 09:01:16 +00:00
Major Hayden 2653926436 Ansible 2.1.1 update
Co-Authored-By: Major Hayden <major@mhtx.net>
Change-Id: Ic59abac5d7f15da37748d5b9121b74cd8e75d3c3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-27 15:00:22 +00:00
Jesse Pretorius b5ce16c949 Compress test execution logs
The volume of logs we collect in CI jobs are extensive. This
patch ensures that the logs collected are compressed to reduce
the space taken in CI systems.

PYTHONUNBUFFERED is also set to ensure that the console log
from the CI jobs is recorded in the exact order of execution.

Change-Id: I0a084eaec2340dbca6acc9cd41652462d80d875f
Related-Bug: #1620849
2016-09-09 09:30:10 +00:00
Kevin Carter 8dbc811c69 Enable log collection after functional testing
This change enables log collection within the gate so that further analysis
on gate tasks can be performed post build. This is very useful when
debugging problems.

Change-Id: I984bc41f1db7cc7228aaf9623213dded4925e2da
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:34:39 -05:00
Jesse Pretorius 86fd6871f7 Make all linting tests use upper-constraints
As per [1] all linting tests can now use upper-constraints. This patch
removes all instances of the install_command override relating to lint
testing which were needed to negate the use of upper-constraints.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: I3b37ea571456a1a28f3bc1c8d642e25597b0f531
2016-08-20 16:04:54 +01:00
Jenkins 9c879a67cf Merge "Include ansible commands for ansible linting" 2016-08-11 21:53:52 +00:00
Jean-Philippe Evrard 74fd1d89df Include ansible commands for ansible linting
The plugin repo needs to be cloned for ansible-lint to
understand ansible plugins. The commands currently
reside in tox.ini under the ansible section and are not
currently included. This commit fixes that error.

Change-Id: I303410da646ccdb39342068fc3d0960c67c5df97
2016-08-11 18:08:45 +01:00
xianming mao c2584feae7 Drop H303 in flake8 ignore list
There is not H303 in hacking >=0.10.0,so we need delete it to
improve performaece!

Change-Id: Ia0df2b3782448f94d863f6106b2101809a412747
2016-08-10 19:58:54 +08:00
Jesse Pretorius c8262ab0c1 Ensure that doc linting is included in the linters test
The 'docs' tox target executes the doc8 lint test which may result in
failures when testing documentation builds, but OpenStack-CI does not
execute that tox target.

In order to ensure that we catch all standard documentation syntax
errors and prevent them from merging, this patch includes the docs
target in the 'linters' chain of tests.

Fixes for any failures which result from executing this test are also
included in the patch.

Change-Id: I139e07601079b14e4c3634f9b5d0815abe6269db
2016-07-26 07:39:57 +01:00
Jesse Pretorius 0cad7a46cf Use plugins repo version of the human_log callback plugin
With the implementation of https://review.openstack.org/321331 the
human_log callback plugin is now part of the plugins repo.

This patch removes the retrofitted version in tox in favor of using
the version from the plugins repo instead.

Change-Id: I7db2a37ae62d20f2ac2711877210a6c439aa612f
2016-07-15 14:01:48 +01:00
Jesse Pretorius c6ef8390d7 Implement doc8 checks for docs
In order to prepare for the move of detailed configuration
content from the install guide to the roles, doc8 checks
are being implemented in the roles to ensure that any new
content submitted is properly checked.

Change-Id: Ifd7b723dafc832b908490239b373f601d7cf4df1
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:08 +01:00
Jesse Pretorius 95a0f721e8 Update tox configuration
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to improve the
reliability and effectiveness of test execution, this patch implements
some changes to the tox configuration:

- The minimum tox version is increased in order to be able to use
  constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
  venv for the linters checks.
- Any proxy environment variables set on the test host are passed
  into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
  a new venv called 'ansible' and this environment is inherited
  by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
  executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
  so it doesn't.
- The Ansible role download will no longer ignore errors so that any
  problems discovered will result in a failed test.
- The human readable logging callback plugin is implemented for
  functional testing.
- The ansible test requirements are moved into tox.ini to ensure
  compliance for requirements.txt/test-requirements.txt for the
  global-requirements management contract.
- The ~/.ansible directory as a whole is not deleted. Instead only
  the plugins and roles folders are deleted to ensure that zuul's
  Ansible artifacts are left in-place.
- The ansible-lint version is updated to support execution against a
  folder, and the test now executes against the entire role to ensure
  that it captures all applicable files for lint testing.

This is a combined port of the following:
- https://review.openstack.org/323507
- https://review.openstack.org/338193
- https://review.openstack.org/332443
- https://review.openstack.org/338193
- https://review.openstack.org/339493

Change-Id: Ice4884ebe0873fb433e0e93d4b1d7286dae36755
2016-07-08 14:52:31 +01:00
Jesse Pretorius b9b1298aab Add reno scaffolding for release notes management
Change-Id: I6f0140f7b0a7931798400b329d4600d26411d677
2016-04-09 19:19:47 +01:00
Matt Thompson 55b68f63ec Update tests to work w/ secure_path update
The tests in this role were crafted to work with an upstream image
config that persisted a user's PATH when the user sudos to root.  We
raised this issue with openstack-infra as it was a non-standard config
and difficult to debug. This was reverted in [1] and this commit now
updates the tests to not assume that packages are being installed into
tox's functional venv.

[1] https://review.openstack.org/#/c/296598/

Change-Id: Ibb068f558fcc05c57f291698023459c92cbe12d6
2016-03-29 10:49:24 +01:00
Matt Thompson ad5736d3f3 Cinder functional testing
This commit does the following:

- separates test.yml into a number of individual task files
- updates tests/inventory and adds localhost to cinder_all and
  cinder_volume groups
- updates tests/inventory by setting localhost to use the
  python interpreter in the tox venv (this is needed because
  openstack-infra runs tox with PYTHON set to the venv's
  interpreter)
- updates tox to symlink python-apt on host into tox venv
  (this is needed in the functional test as we are now running python
  from the venv and there is no clear way to simply pip install this)
- creates a cinder volume and validates it goes active
- bumps keystone and cinder SHAs in the tests to use stable/mitaka and
  a more recent requirements
- updates paste, policy and rootwrap configurations
- updates API checks to allow for both 200 and 300 status codes

Change-Id: I9b62bc841f86349b60b978fcfc813afe0a313318
2016-03-23 16:19:03 -07:00
Matt Thompson 3c4b5d0f72 Enable functional convergence testing
This commit updates tests/test.yml to deploy rabbitmq, galera,
keystone, and cinder for a functional convergence test.  Note that we
point at a non-existent memcached server, but this can be adjusted to
build memcached if deemed necessary. Additionally, we do not configure
a cinder-volume backend, but simply deploy the service itself. This is
something that can be tweaked in a later revision.

Change-Id: I2d8d2dcc3703603eca96271635311373338cf4da
Partial-Bug: #1553971
2016-03-08 16:20:23 +00:00
Jimmy McCrory b60591f75b Implement base configuration for independent repository
Change-Id: If3cee9b9da230ec4f96fc3355889c984d1977975
2016-03-01 09:38:00 -08:00