Codebase list cinder-tempest-plugin / b0b5bd1
Merge "Move and rename tempest_tests to cinder/tests/tempest" Jenkins authored 10 years ago Gerrit Code Review committed 10 years ago
9 changed file(s) with 154 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ===============================================
1 Tempest Integration for Cinder
2 ===============================================
3
4 This directory contains additional Cinder tempest tests.
5
6 See the tempest plugin docs for information on using it:
7 http://docs.openstack.org/developer/tempest/plugin.html#using-plugins
8
9 To run all tests from this plugin, install cinder into your environment. Then
10 from the tempest directory run::
11
12 $ tox -e all-plugin -- volume
13
14
15 It is expected that Cinder third party CI's use the all-plugin tox environment
16 above for all test runs. Developers can also use this locally to perform more
17 extensive testing.
18
19 Any typical devstack instance should be able to run all Cinder plugin tests.
20 For completeness, here is an example of a devstack local.conf that should
21 work. Update backend information to fit your environment.
22
23 ::
24
25 [[local|localrc]]
26 VIRT_DRIVER=libvirt
27 ADMIN_PASSWORD=secret
28 SERVICE_TOKEN=$ADMIN_PASSWORD
29 MYSQL_PASSWORD=$ADMIN_PASSWORD
30 RABBIT_PASSWORD=$ADMIN_PASSWORD
31 SERVICE_PASSWORD=$ADMIN_PASSWORD
32 SCREEN_LOGDIR=/opt/stack/screen-logs
33 LOGFILE=$DEST/logs/stack.sh.log
34 LOGDAYS=2
35 SYSLOG=False
36 LOG_COLOR=False
37 RECLONE=yes
38 ENABLED_SERVICES=c-api,c-sch,c-vol,cinder,dstat,g-api,g-reg,key,mysql,
39 n-api,n-cond,n-cpu,n-crt,n-net,n-sch,rabbit,tempest
40 CINDER_ENABLED_BACKENDS=lvmdriver-1
41 CINDER_DEFAULT_VOLUME_TYPE=lvmdriver-1
42 CINDER_SECURE_DELETE=False
43 TEMPEST_ENABLED_BACKENDS=lvmdriver-1
44 TEMPEST_VOLUME_DRIVER=lvmdriver-1
45 TEMPEST_VOLUME_VENDOR="Open Source"
46 TEMPEST_STORAGE_PROTOCOL=iSCSI
47 LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
48 VIRT_DRIVER=libvirt
49 ACTIVE_TIMEOUT=120
50 BOOT_TIMEOUT=120
51 ASSOCIATE_TIMEOUT=120
52 TERMINATE_TIMEOUT=120
53
54
55 [[post-config|$CINDER_CONF]]
56 [DEFAULT]
57 [lvmdriver-1]
58 volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
59 volume_group=stack-volumes-1
60 volume_backend_name=lvmdriver-1``
61
0 # Copyright 2015
1 # All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14
15 from tempest import config
16 from tempest.tests import base
17
18 CONF = config.CONF
19
20
21 class CinderPlaceholderTest(base.TestCase):
22 """Placeholder test for adding in-tree Cinder tempest tests."""
23 # TODO(smcginnis) Remove once real tests are added
24
25 def test_placeholder(self):
26 expected = 'This test is temporary and should be removed!'
27 self.assertEqual(expected, expected)
0 # Copyright 2016
1 # All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14
15 from oslo_config import cfg
16
17 service_available_group = cfg.OptGroup(name="service_available",
18 title="Available OpenStack Services")
19
20
21 ServiceAvailableGroup = [
22 cfg.BoolOpt("cinder",
23 default=True,
24 help="Whether or not cinder is expected to be available"),
25 ]
0 # Copyright 2015
1 # All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14
15 import cinder
16 import os
17
18 from cinder.tests.tempest import config as project_config
19 from tempest import config
20 from tempest.test_discover import plugins
21
22
23 class CinderTempestPlugin(plugins.TempestPlugin):
24 def load_tests(self):
25 base_path = os.path.split(os.path.dirname(
26 os.path.abspath(cinder.__file__)))[0]
27 test_dir = "cinder/tests/tempest"
28 full_test_dir = os.path.join(base_path, test_dir)
29 return full_test_dir, base_path
30
31 def register_opts(self, conf):
32 config.register_opt_group(
33 conf, project_config.service_available_group,
34 project_config.ServiceAvailableGroup)
35
36 def get_opt_lists(self):
37 pass