Commit Graph

49 Commits

Author SHA1 Message Date
Jonathan Rosser e93509ec6f Cleanup setup.py config
Change-Id: I4bc528e67c097f649c6e49cf39a3452a853560be
2022-04-04 10:42:44 +01:00
likui 0f25baaa38 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: I5b77381ceaa34e2069b226fc6825f78cefc57a30
2021-07-03 21:12:28 +08:00
zhoulinhui 87a2549a7b Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is deprecated and TOX_CONSTRAINTS_FILE is
the new environment variable name that replaces it [1].

This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
[2] https://review.opendev.org/#/c/722814/

Change-Id: Id479e07817e2c405564dad2e2dacd1812cabdacd
2020-11-10 05:15:20 +00:00
melissaml 300d0d1d69 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: I467df391b180a2988cf4f7b82a6ea1a4cd4fd4dd
2020-04-14 16:42:34 +08:00
Ghanshyam Mann f9e2cda9d4 [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: Id2f8b89f768662b54976d502f893a84171333a75
2020-03-01 18:54:51 -06:00
Zuul e73eaea250 Merge "tox: Keeping going with docs" 2019-12-12 21:01:34 +00:00
Dmitriy Rabotyagov 72e0a52d53 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I4f6fc9144bee0cf49326cc9df8b0f972d8bd5064
2019-11-14 17:19:40 +02:00
jacky06 17682aacd9 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: I0da30b17236cfaed417e0075ba0bab1661391b7a
2019-10-23 17:38:36 +00:00
Dmitriy Rabotyagov 283a6c0181 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: I6f3b5967ad906632d325b002b510e3fa96aac227
Story: 2006105
2019-10-18 17:18:44 +03:00
Zuul 10c4c18564 Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-08-20 04:14:07 +00:00
Jonathan Rosser 9376fd253d Remove support for the nova-lxd driver
This driver has been retired [1] and tests are now failing becasue the
nova-lxd repo master branch is now empty.

[1] https://review.opendev.org/#/c/672283/

Change-Id: I9906ede54f6b41972a03bfa1d39ba5f99c6235ed
2019-08-10 15:28:47 -04:00
melissaml 49758212f5 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: If444606a7473d6abdceac662d6002836a53f4a2d
2019-05-06 19:25:48 +08:00
Jesse Pretorius f6ab8c4a8a 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.
3. We rename the tox target for 'func_lxc' to 'lxc' and
   as the 'func_' prefix is pointless.
4. We remove the base python setting in the lxc tox target
   because we're not running our functional tests using py3
   yet.

Change-Id: Ie0e72f69026c44a3c3ff6316bbb308bdd873c149
2018-09-08 15:51:20 +00:00
Jesse Pretorius c5268bcf1d 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: I3eccb8dd422d9d4eb980eef6ccd58f2e135994f6
Needed-By: https://review.openstack.org/579371
2018-08-16 18:23:44 +01:00
Tuan Do Anh adfb7fe6f4 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: I7c161e4b57db8553554d8bb120c3dd91998c838a
2018-07-09 16:20:22 +07:00
Markos Chandras 1deb3b5a26 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.

Depends-On: https://review.openstack.org/#/c/579151/
Depends-On: https://review.openstack.org/#/c/579071/
Change-Id: Iff373b5402c664206b940b8e95a0b8845050213b
Implements: blueprint openstack-distribution-packages
2018-07-03 11:19:56 +01:00
Jesse Pretorius dfcb48c0e0 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: I608e108801ed0e913185c2a29f57bde52112dd35
2018-07-01 17:07:10 +01:00
Jesse Pretorius 5eb9876439 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: I4837704fd5519c1507fc72189dde87cb75729e44
2018-03-28 10:15:33 +01:00
Jesse Pretorius 8ac539f4cb 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: Id56bf8691ab95d4d53d60b887f7e9e6b9654eb95
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 18:01:01 +00:00
ZhongShengping 4776ed85a1 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: I493229df292e7e5da6a941d623a6cc956b2cfad9
2018-03-09 12:01:27 +08:00
Jimmy McCrory 70c663391b Add MySQL connection SSL support
When 'nova_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.

Change-Id: I9f9a130be3a4920170295b041b94dd435e3781d1
Partial-Bug: 1667789
2017-12-15 09:20:47 -08:00
Jesse Pretorius afa6fc5c14 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: I90dca808ff563326c376aac78889b711ed7625ed
2017-06-04 11:22:16 +01:00
Jesse Pretorius 83b17c9b5e 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.

Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Change-Id: I170decc3aa8864c25cac322f79b518454abf0505
2017-05-04 11:45:14 +01:00
Andy McCrae 58bfc33bd2 Split upgrade testing into it's own shell 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: Icaeb360a6302ff207d970c0c6fe8e56add1e1327
2017-02-23 19:39:57 +00:00
Jesse Pretorius 0c4bf882f2 Update upgrade test to use stable/ocata
Change-Id: Ib0b9ec0c3bc15ca980d01f8b170de796e8c402fa
2017-02-08 14:26:31 +00:00
Cao Xuan Hoang 5b624d6cea Use https instead of http for git.openstack.org
Trivialfix

Change-Id: Ic1f293e0c3bcbce3fd5c7179b1564079fe42f05d
2017-02-06 16:28:44 +07:00
Andy McCrae 72e4e7d178 Split upgrade test into its own play
To avoid requiring all the os_previous_nova 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: I8ab8de7db6d4b89eb58e183d453f04cd614cf085
2017-01-21 14:31:51 +00:00
Andy McCrae a05a804e87 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: Ife6dd4a0488765cc9ffd74f11cf8a519d213ea48
2017-01-18 17:33:49 +00:00
Andy McCrae 1c9ebcec8f Nova upgrade testing.
Implement upgrade testing for os_nova role.

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

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/

TODO: (andymccr)
Nova deprecated the nova_cert project, which means the group has been
removed from the os_nova role. For now a workaround has been added to
add the nova_cert group to the upgrades inventory, the default is to
have nova_cert in it's own container so we could just remove those as
part of an N->O Upgrade.

Change-Id: I3a83c3f91c85ea532d1963c007bb81cae6de2cd7
Implements: blueprint upgrade-testing
2016-12-08 12:14:09 +00:00
gengchc2 1227539e7c Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:
    https://github.com/openstack-dev/hacking/blob/master/setup.cfg

Change-Id: I4fb2c6360dbf3cf3b59eb435b5bbd161c0ff0088
2016-12-06 09:38:23 +08:00
Jesse Pretorius b082fe99f8 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: I9f3ca37e6b52fa496d92acefa32be76dc6edf1f7
2016-10-19 07:43:54 +01:00
Jesse Pretorius d1c0549e21 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: If42c1f2d26d0fda8e120898832a64809f4ce5819
2016-10-10 21:52:59 +01:00
Jesse Pretorius 8a7dca54e5 Remove install_test_packages variable
With https://review.openstack.org/381479 merged, setting this
variable in tox.ini via an extra var is unnecessary.

Change-Id: I17484a1ecf6eeb636f237ae2a67566da1038ce23
2016-10-04 11:42:26 +01:00
Jesse Pretorius b838299a53 Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: I379a67a3178bd10b1a5b0ae0b53289e1355e3ba1
2016-09-28 10:27:39 +01:00
Andy McCrae 35d85e953f Use openstack-ansible-tests for os-nova role
Move Nova to use the central testing repository.
Incorporate the Ansible 2.1.1 changes with the move to central testing
repository.

Change-Id: I98ba72fee246a87faaf54fa33181e6be04a912cd
2016-09-20 12:36:33 +01:00
Jesse Pretorius ec5b10fc34 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: I867081cb1f263e554f7dbe02791a46c9d2cef60f
Related-Bug: #1620849
2016-09-15 01:07:04 +00:00
Kevin Carter f6f6299983 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: I96e532605a12a4d15ec9cc038f1d2c9acc6730a4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:37:12 -05:00
Jesse Pretorius aeeb50ae75 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: I6f3b7b0c9a62b1a0787d3512c046c96b59b444d9
2016-08-20 16:06:28 +01:00
Jenkins 8a9a265670 Merge "Include ansible commands for ansible linting" 2016-08-12 22:33:58 +00:00
Jean-Philippe Evrard 443f1b0a03 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: Ifadfc1904a5bbfca73eaf9742169d389c04d93ba
2016-08-11 18:09:57 +01:00
Michael Gugino ec0670b27a Implement tests for nova-lxd hypervisor
This commit implements automated testing for the
nova-lxd hypervisor.

Change-Id: Ib49312dcb8fb5bd553369819cfd551137ff1c19e
2016-08-10 12:07:30 -04:00
Jesse Pretorius 64e6772c08 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: I3d2ca1baae0b6fc7b24619c1df04bc62e4a8ab8c
2016-07-25 14:11:29 +01:00
Jesse Pretorius bd0246c42f 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: I3cf2147ba6cfd9d9d5fb1b68c4c8a525ff9b93af
2016-07-19 01:59:58 +01:00
Jesse Pretorius dc472f3bc9 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: I8e1881e9d33f188eae3aa34498d42a773f541e52
2016-07-18 16:36:28 +00:00
Andy McCrae 0661affc6d Add wget to whitelist_externals for tox
This patch adds wget to the whitelist_externals for tox.ini.
This will prevent a minor error that occurs in the logs due to wget not
being in this list - even though it is used when getting human_log.py

Change-Id: I976bc361c0b2741a88a76a1489a7c44b03dd4a47
2016-05-26 12:06:11 +01:00
Matt Thompson 96a443f39d Use tempest for testing
This commit updates os_nova to use tempest for functional testing of
nova.  For this to work on openstack-infra instances we have to drop
all existing iptables rules using iptables-clear.sh.  This commit also
updates the netmask used across containers as we currently have a mix
of /22 and /24.

Note that I couldn't get the vxlan traffic to work over
10.100.100.0/22, so I created br-vxlan and wired separate container
interfaces into that.

Change-Id: I33378e6275b70152d45357ac1ceb200ea4d5daf0
2016-04-22 15:43:30 +01:00
Jesse Pretorius 8f3acb982d Add reno scaffolding for release notes management
Change-Id: If184e01e8c119c2b3e93ef9f42ba8bafa045a4a0
2016-04-09 19:21:11 +01:00
Matt Thompson 3206988c00 Enable functional convergence testing
This commit updates tests/test.yml to deploy rabbitmq, galera,
keystone, and nova 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 deploy the
nova-compute service but as it is within a container it's
non-functional.  Closer inspection also reveals that while the service
is running, it's actually throwing an error due to lack of python
libvirt module.

Change-Id: Iba146290f64dbed23ae1d67c3548a884288b292b
Partial-Bug: #1553963
2016-03-14 14:39:39 +00:00
Kevin Carter f379c6abd4 Implement base configuration for independent repository
Change-Id: I91826d92a1c4bf30a9be77d538ffaa45b3bf7c8e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-03-02 00:07:37 +00:00