Commit Graph

53 Commits

Author SHA1 Message Date
Damian Dabrowski 021f18905f Make _tempest_plugins a list of dicts.
For some reason we define a list inside a _tempest_plugins dict.

It should be simplified to the list of dicts.

Change-Id: I891f77e3e22c962615697504d0870e25017511d7
2022-07-12 10:37:47 +02:00
Martin Kopec e656a2e264 python-tempestconf moved from osf/ to openinfra
python-tempestconf project got moved from osf/ namespace into
openinfra/one by:
https://review.opendev.org/c/openstack/project-config/+/808479
This commit reflects that.

Change-Id: I696349c0eee715f270ce97b60b421b219ab0fec4
2021-10-18 11:01:18 +00:00
Andreas Jaeger 1ba6292917 Fix tempestconf URL
Change I02ac67e333cc1a5133269bd8562f18a8d50bb036 renamed
openstack/python-tempestconf to osf/python-tempestconf. Update use in
this repository.

openstack-ansible team: Please check whether this needs backporting and
do the backporting yourself.

Depends-On: https://review.opendev.org/734672
Change-Id: I303be4967f161fd004ecbba74b7367410d44db36
2020-06-16 05:20:31 +00:00
Dmitriy Rabotyagov 3881909832 Cleanup after repo_build and pip_install retirement
Change-Id: I9d37d9f5f3cd2c5177e5251952da99de50a21116
2020-05-15 21:03:02 +00:00
Dmitriy Rabotyagov b20aec1329 Add uwsgi role to role requirements
In order to satisfy linters we need to add uwsgi role into
tests/ansible-role-requrements.yml

Change-Id: I02a2a406cf3d3b0705d68ef3fa75a447f8cb0b4f
2019-09-06 22:14:41 +03:00
Zuul 3c5ef4c3f9 Merge "Remove Neutron LBaaS from test inventory" 2019-07-13 00:26:03 +00:00
Chandan Kumar ecdc0eedaf Update openstack.org -> opendev.org
It updates the url from git.openstack.org to opendev.org and
also remove cgit from opendev.org.

Keeping vagrantfile, run_tests.sh and bindep.txt as itis
as these are updated automatically by openstack-ansible-tests.

Change-Id: Ia449079776e0339515ae1a2bca7553b03d9cde1c
Signed-off-by: Chandan Kumar <chkumar@redhat.com>
2019-05-30 15:29:22 +05:30
Logan V 42fefda49f Remove Neutron LBaaS from test inventory
Change-Id: Ib2fcccbc404b36b3aa8b2264fc080885b5a357a3
2019-05-16 15:49:14 -05:00
Jonathan Rosser bc1fcbc9eb Add an ip address to eth12 in OSA test containers
The tempest tests need to ssh to booted virtual machines. The neutron
public network is 10.1.3.0/24, which is the flat network on br-vlan.
From the container perspective this was previously reached via the
default gateway on eth0 as there was no specific route to the
10.1.3.0/24 network.

On centos traffic is no longer being forwarded to the br-vlan flat network
via the container eth0 and host networking, but this still works for
other distributions.

This patch adds an IP address to the present, but previously un-addressed
interface eth12 in each container. This gives a direct route to the neutron
public network from the container and does not require the host network
to forward the traffic. The test setup is now more decoupled from the
host networking which should increase reliability.

Change-Id: Id8fbe05e83bc6d86f57202301e712fc4e8a17003
2019-01-29 14:21:34 +00:00
Chandan Kumar cf90066608 Added support for installing python-tempestconf from git
In CI jobs, currently python-tempestconf is getting from pip,
which makes it hard to test dependent changes of the project.
By adding this support, one can test the python-tempestconf
changes in the review itself.

Setting tempest_developer_mode to true will exercise the same.

Change-Id: I7744270e7371260dcc4db146736710fb050f3502
2019-01-04 13:57:39 +05:30
Chandan Kumar 7e6e614ff0 Added support for installing tempest from distro
In order to consume os_tempest role across different deployment
tools, following changes are introduced:
- tempest_install_method:distro|source through which user can install
  tempest from source as well as distro
- tempest_workspace directory is added as when tempest is installed
  from distro, we need a place where tempest can be executed. It
  generalised the use of tempest_workspace at each place.
- The default location of the default tempest configuration is now
 /etc/tempest/tempest.conf rather than the previous default of
  $HOME/.tempest/etc.

Change-Id: Ie280cfa6b93fa65c56ed98066deb4f9c82a1a8db
2018-10-26 08:19:51 +00:00
Jimmy McCrory d77b3d1748 Set container_name as host_var in test inventory
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.

Change-Id: Ia62cbc85fc1f1e8db4ce8f8aa41beef5ecefcc49
2018-10-20 15:28:29 -07:00
caoyuan deaee29ec3 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I99486c136d34cda038ea3c2d543df4081178ce60
2018-08-15 17:22:53 +08:00
Jesse Pretorius fea608bbf7 Switch compute to use different inventory_hostname
Our role tests execute as non-root users, and the roles
need to access the environment variables for that non-root
user. Ansible, when targeting localhost, changes to
'connection: local' and thus breaks everything we need
to do against localhost as root unless we use 'become: true',
but we if generally use that against remote hosts we lose
the environment variables for the non-root user.

As such, we switch the inventory to target 'compute1' instead,
which has the address '10.1.1.1' (br-mgmt), so that we do not
have to deal with the implict connection type changes implemented
by Ansible.

Depends-On: https://review.openstack.org/584033
Change-Id: I79256f9cb542732cfdff6439768f94769ee33b1c
2018-07-19 18:04:34 +00:00
fpxie 36de3b8ee6 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I1c5f591a476cf888fbd3bb09ea55a46849c66e04
2018-06-20 16:27:19 +08:00
Jesse Pretorius bfd6f455c5 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: Ibfb1b6266f8014a9ac40576f4182279a88791f46
2018-03-28 10:16:37 +01:00
Matt Thompson f8404f5eeb Switch from testrepository to stestr
This commit replaces the call to testr with stestr, and updates the
output files accordingly. This is necessary because tempest has moved
away from testrepository [1], which is resulting in empty files being
created.

Lastly, we update the functional tests to ensure the subunit results
files exist and are not empty.

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

Change-Id: I2496fccff1f51c586e999538232a4bcf0addbee5
2018-03-27 18:02:18 +00:00
Zuul b66a45158a Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-26 12:30:18 +00:00
Jesse Pretorius 6c76e1f7b6 ansible-role-requirements: Use systemd_service role from openstack namespace
In order to ensure that the updated role is used for tests,
we adjust the a-r-r file to pull from the correct repo.

Change-Id: I77b3211ad6d479223636a5a3514cd79d9ac0389f
2018-03-25 16:21:42 +01:00
Jesse Pretorius 63cb51deca ansible-role-requirements: Add common python_venv_build role
In order to allow tests to work as the use of the common
role is implemented in the various roles, we pre-implement
the addition of the role into the a-r-r file.

Change-Id: I4b8670453da0bfcd7d014d9e4a1aeda3e7d7f149
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:22:02 +00:00
Jesse Pretorius af8b3766aa ansible-role-requirements: Add common systemd_service role
In order to allow tests to work with https://review.openstack.org/551028
merged, add the role to the a-r-r file.

Change-Id: I42078cf39bc59b746c3a367aeef3da84d8d0924b
2018-03-13 16:52:34 +00:00
OpenStack Proposal Bot 2da7201e27 Updated from OpenStack Ansible Tests
Change-Id: I32eec745e7d89784cf0196c491febe3279d6e5d3
2018-02-14 20:07:29 +00:00
Zuul 98cf84fea1 Merge "ansible-role-requirements: Switch ODL git repo to the github mirror" 2017-11-23 16:34:09 +00:00
Jimmy McCrory 06a6106364 Fix ansible-lint test failures
With the merge of https://review.openstack.org/520177 in the
tests repo some ansible-lint failures which previously were
not being picked up are now detected.

Change-Id: I5e24ce49f6200d85a186c6b67e5d3036db6d05bb
2017-11-21 17:32:26 -06:00
Jesse Pretorius d20747ad29 ansible-role-requirements: Switch ODL git repo to the github mirror
Cloning from the official ODL git repository fails far too often with
the following error

fatal: unable to access 'https://git.opendaylight.org/gerrit/p/integration/packaging/ansible-opendaylight.git/': gnutls_handshake() failed: Error in the pull function

Lets switch to the github mirror which may be more reliable.

Change-Id: I0965828129179e202356e3a8ee7e6b87e03457dd
2017-11-21 10:41:22 +00:00
Jesse Pretorius 37439954e4 Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Depends-On: I0391ec310c4eede436011a48490e3c524c8ddf4d
Change-Id: I695084aa70d6bd48cd8d498556918a1fbbc3c2a2
2017-10-18 17:32:14 +00:00
OpenStack Proposal Bot 736678a2d8 Updated from OpenStack Ansible Tests
Change-Id: I0e5addc2f3fa878c06020da48530eaeb0544e737
2017-10-12 20:45:09 +00:00
Jesse Pretorius bd38611423 Add opendaylight role to tests a-r-r
In order to pass the lint test, all meta-dep
roles for the roles we execute in the test must
be present. As the os_neutron role recently got
the opendaylight role added as a meta-dep it is
now required here too.

Change-Id: Id3e98cafaa7593023d1dd750045e8156f70ffdf3
2017-08-23 06:51:22 +01:00
ZhongShengping 32a34a21fd Add ceph_client role
The role 'ceph_client' was not found in openstack-ansible-os_tempest,
so add it.

Change-Id: I0ed821f48510dd36b8067c313890386221f90720
Closes-Bug: #1704294
2017-07-17 10:36:59 +08:00
OpenStack Proposal Bot d454de9f71 Updated from OpenStack Ansible Tests
Change-Id: I4202869fe093e1c2db11d16725f9859a52627345
2017-06-22 15:20:06 +00:00
Luz Cazares dbb46550bf Rename tempest result files
To provide visibility of testrepository subunit results
- Generated by tempest run - to the gate logstash [1] and
further processing that allows OSA project to be displayed under
health dashboard [2].

The subunit file should be always collected - even when test cases fails -

Files should be zipped and named: **/*testr_results.html.gz and
**/*testrepository.subunit.gz. So that publisher [3] picks them up

[1] https://github.com/openstack-infra/system-config/blob/master/modules/openstack_project/files/logstash/jenkins-log-client.yaml#L14
[2] http://status.openstack.org/openstack-health/#/
[3] https://github.com/openstack-infra/project-config/blob/master/jenkins/jobs/macros.yaml#L975

Change-Id: Ia06389d8724f23283f72dea3b055d0cb43b0be32
2017-06-19 23:35:06 +00:00
Jesse Pretorius a2a5320466 Never fail for result generation tasks
The results generation should never fail the
execution of the role as the tasks are a value
add, rather than a necessary requirement.

Also, generate the results files in the log
folder instead of creating them and then
copying them.

Change-Id: I0bcda58c93680a48a618f5448a613272803c50cf
2017-06-19 11:39:43 +01:00
Jesse Pretorius 53a8cea809 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: If75af45f9ebc17b85bbc8aec019714f4a3625753
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:53:32 +01:00
Jimmy McCrory 191a402a6d Unpin nova_git_install_branch
https://review.openstack.org/#/c/455710/ merged.

Change-Id: I07f94b49be8e0b4d1f07d7bfdadd23472466e719
Depends-On: I4ca3d90123e146d09cab20a0eda627014d9717e6
2017-04-28 23:22:34 +00:00
Jimmy McCrory b800f18e3b Fix role gate tests for Ansible 2.3
'ansible_become' defined as a host_var or in the inventory for a host
has a higher precedence than 'become' defined within a playbook.

In change Id5b76a87809f03951c954fc3d752419a673403f7, 'become' was
defined explicitly for each play running against localhost so
'ansible_become' should be removed from its host_vars.

A Bug in nova prevents our tests or Nova from working properly. This is
being fixed in https://review.openstack.org/#/c/455710/, but until that
merges we should SHA pin upstream nova to allow development to continue

Change-Id: I56b21b58b0a2e55cc83c9a3f1002ca462992227d
2017-04-20 10:36:55 -07:00
Matt Thompson d4c8ecf824 Add cinder multi-backend tests
This commit updates templates/openstack_tempest_gate.sh.j2 and the
default tempest_test_whitelist to expose a cinder multi-backend test.
This is useful for ensuring that a) multiple backends are operational
(ceph/LVM for instance), while also testing that the multi-backend
features are functional.

NOTE: We also change the tests to use the sahara tempest plugin rather
      than designate as the designate plugin appears to be broken at
      the moment.

Change-Id: I4a730614cfb695b82a79dfbe540396e5f4fd198a
2017-02-23 16:34:33 -05:00
Andy McCrae 6a0005f377 Add nova_placement service to tests inventory
Change-Id: I5428fe7b81753ab1c3a275a526565e7c5481b73c
2017-02-08 11:39:34 +00:00
Jesse Pretorius 95bc28552a Execute tempest using updated method
The old method of executing tempest via run_tempest.sh from
the root of the git clone has been deprecated and will soon
be removed.

This patch does the following:

- Moves the tempest execution into the role.
- Provides the ability to set the tests to be executed
  as a list. The list becomes a whitelist which is given
  to tempest to run. The whitelist can be a specific list
  of tests, or line seperated regex.
- Uses the modern execution method, but leaves the old
  method in place to allow other roles to transition.
- Exports the subunit results as raw, xml and html results.

Implements: blueprint testing-direct-tempest
Change-Id: I40f816ead338f90f9537a8494822ff10b06021cb
2016-10-17 21:20:21 +00:00
Jesse Pretorius 7323a6bec2 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Iea3a6f853b2347b1463644c89136a313711e7785
2016-10-05 19:00:41 +01:00
Andy McCrae 577741ab37 Move "--no-binary libvirt-python" to ansible-tests
To avoid overriding important "pip_install_options" that apply to all
hosts, we should move the pip_install_option to the central tests
repository.

This happens as part of the following PR:
https://review.openstack.org/381023

This PR removes the override from tempest.

Change-Id: I90fb3134650376f734f030be99f8d268924da767
Depends-On: I1c25e2c95e3bd5aca02b6220f82cf577ccfdbc8b
2016-10-03 11:58:45 +01:00
Andy McCrae 9b7b6ba267 Move tempest to Ansible 2.1.1 and central testing
Move tempest to use the central test repository as well as Ansible
2.1.1.

This mirrors the change made for the openstack-ansible-os_nova role,
whilst keeping tempest running on it's own container for testing
purposes.

Additionally this moves to use the testing scripts to simplify and make
the tox.ini file more uniform.

Co-Authored-By: Travis Truman <travis_truman@cable.comcast.com>
Change-Id: I06771dba022fa91bb0230a7c0ebe6d7872e80004
2016-09-30 09:32:14 +00:00
Andy McCrae 76eee2fa7e Ensure tempest runs independently in testing
In tempest role tests we install tempest on a container that already has
other services installed on it.

To ensure the tempest role is indepedent we should test it by deploying
it in it's own container.

We need to fix the dependencies for the tempest role by installing git
on the tempest host.

Change-Id: I0230f1a93d16243fc50df79b2d0780e744706c7b
2016-09-07 12:23:48 +01:00
Travis Truman 248d6b87a7 Fix linters failure due to etcd role
role linters task is failing with:
  "sorry, etcd was not found on galaxy.ansible.com."

Change-Id: I11a78c1578ca95aa6a712cf3b1797fdae2eaa5e2
2016-08-24 18:51:35 -04:00
Andy McCrae a467fcf9dc Fix interface configuration for tempest gate
The tempest gate is failing due to tempest being unable to boot
instances. This is due to the veth peer not being setup correctly, and
the linuxbridge configuration being incorrect

This PR fixes the veth peer and and the neutron configuration
options.

Change-Id: Iaffb5f95ab59918feb5e498bbdc6a6325abaa4d4
2016-08-15 21:54:04 +00:00
Michael Gugino e94e30da0a Add additional test coverage
Currenlty, a large chunk of the playbook logic
used to deploy and configure tempest is not covered
in this role's testing.

This patch copies os_nova's testing environment
settings to deploy additional services.

Change-Id: Ide4764609488b157a1540d1f8828d067faeafdb8
2016-08-04 01:39:15 +00:00
Travis Truman d9e32c058e Add ability to configure zaqar for tempest testing
Paving the way for zaqar role testing using the tempest
plugin available within the zaqar source code

Change-Id: Idae0472788efdc99fa35bd011090a863c29fea7f
2016-07-28 11:36:28 -04:00
Jesse Pretorius acd7a656ac Clean up container cache prep in tasks
This patch cleans up the container cache preparation in the tests
due to the following patches:

- https://review.openstack.org/307856 (new image build process)
- https://review.openstack.org/315114 (new apt config process)
- https://review.openstack.org/322188 (new resolver config process)

Change-Id: I8d016fa626bc13ac89731c977f690b425dce4f21
2016-06-17 19:48:54 +01:00
Jimmy McCrory a36051f03a Remove pip_lock_down dependency
The pip_install and pip_lock_down roles have been merged.

Remove pip_lock_down from the role's meta dependencies and test
requirements.

Change-Id: I1f928025b654734ab05a9cd448a2eaf03c509486
2016-06-07 23:31:37 -05:00
Matt Thompson 046e69c423 Fix and add tests for tempest plugin system
This commit does the following:

- fixes a bug in tempest_install.yml where we install plugins into the
  wrong venv location (previously tempest_git_dest, which is no longer
  set)
- updates the plugin clone directory name to use the plugin name with
  dashes changed to underscores (this follows the typical pattern
  imposed by openstack-ansible)
- adds tempest_plugins to test-vars.yml and then ensures that the
  associated tempest plugin is installed

Change-Id: I41644d7f0b8f03edc43629f90aa4910b3eb3dcea
2016-05-13 17:06:06 +00:00
Matt Thompson d32e7f83fd Use correct var in functional test
This commit updates tests/test-tempest-functional.yml to use
tempest_ven_bin instead of assuming tempest is installing into /opt.

We also remove tempest_requirements_git_install_branch since it already
defaults to master.

Change-Id: Ib6624ae06f7cef876376c077861ce368e7289f75
2016-05-12 21:13:55 +01:00