cinder/cinder/tests/tempest
ghanshyam 9ca58419df Cinder Tempest plugin tests: Switch to stable interface
All the cinder tempest plugin tests are inherited from tempest/api/volume/base.py
which is not stable class and can be changed anytime by tempest.

One recent case where some changes in base class on tempest side could
have break the cinder tests-
 http://logs.openstack.org/07/522707/3/check/legacy-tempest-dsvm-full-devstack-plugin-ceph/a92cd60/logs/testr_results.html.gz

This commit switch cinder tests to use test.py which is stable interface
for plugin and create a base class with commonly used function & variable.

Closes-Bug: #1734821

 Conflicts:
	cinder/tests/tempest/api/volume/test_volume_backup.py
	cinder/tests/tempest/api/volume/test_volume_revert.py

NOTE(melwitt): The conflicts are because test_volume_revert.py does not
exist in Ocata and test_volume_backup.py has a snapshot_backup_opt
config option that does not exist in Pike.

Change-Id: I0edda1fa23aed0b3d25691d5f4440a7234decc9a
(cherry picked from commit dae4b6df5f354355cf56eee2547314b2282670f4)
(cherry picked from commit b52b4533c8)
2018-04-20 18:08:05 +00:00
..
api Cinder Tempest plugin tests: Switch to stable interface 2018-04-20 18:08:05 +00:00
scenario Move and rename tempest_tests to cinder/tests/tempest 2016-05-03 17:55:20 +00:00
services Add tempest tests for Consistency Groups 2016-08-29 11:23:51 -07:00
README.rst Move and rename tempest_tests to cinder/tests/tempest 2016-05-03 17:55:20 +00:00
__init__.py Move and rename tempest_tests to cinder/tests/tempest 2016-05-03 17:55:20 +00:00
cinder_clients.py Add tempest tests for Consistency Groups 2016-08-29 11:23:51 -07:00
config.py Reuse already existing groups in tempest plugin 2016-12-01 07:59:01 +00:00
plugin.py Reuse already existing groups in tempest plugin 2016-12-01 07:59:01 +00:00

README.rst

Tempest Integration for Cinder

This directory contains additional Cinder tempest tests.

See the tempest plugin docs for information on using it: http://docs.openstack.org/developer/tempest/plugin.html#using-plugins

To run all tests from this plugin, install cinder into your environment. Then from the tempest directory run:

$ tox -e all-plugin -- volume

It is expected that Cinder third party CI's use the all-plugin tox environment above for all test runs. Developers can also use this locally to perform more extensive testing.

Any typical devstack instance should be able to run all Cinder plugin tests. For completeness, here is an example of a devstack local.conf that should work. Update backend information to fit your environment.

[[local|localrc]]
VIRT_DRIVER=libvirt
ADMIN_PASSWORD=secret
SERVICE_TOKEN=$ADMIN_PASSWORD
MYSQL_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SCREEN_LOGDIR=/opt/stack/screen-logs
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
SYSLOG=False
LOG_COLOR=False
RECLONE=yes
ENABLED_SERVICES=c-api,c-sch,c-vol,cinder,dstat,g-api,g-reg,key,mysql,
                 n-api,n-cond,n-cpu,n-crt,n-net,n-sch,rabbit,tempest
CINDER_ENABLED_BACKENDS=lvmdriver-1
CINDER_DEFAULT_VOLUME_TYPE=lvmdriver-1
CINDER_SECURE_DELETE=False
TEMPEST_ENABLED_BACKENDS=lvmdriver-1
TEMPEST_VOLUME_DRIVER=lvmdriver-1
TEMPEST_VOLUME_VENDOR="Open Source"
TEMPEST_STORAGE_PROTOCOL=iSCSI
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
VIRT_DRIVER=libvirt
ACTIVE_TIMEOUT=120
BOOT_TIMEOUT=120
ASSOCIATE_TIMEOUT=120
TERMINATE_TIMEOUT=120


[[post-config|$CINDER_CONF]]
[DEFAULT]
[lvmdriver-1]
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_group=stack-volumes-1
volume_backend_name=lvmdriver-1``