Add a manila functional check job
This job can be non-voting. Also fix up the functional tests to use a configurable cloud profile, so we can set the desired api microversion to be tested. Change-Id: I952b0590ac571aff220b2285d3dc0b5c5bc99816 Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
parent
d62a4e6062
commit
21795acff6
72
.zuul.yaml
72
.zuul.yaml
@ -352,6 +352,76 @@
|
||||
zuul_copy_output:
|
||||
'{{ devstack_base_dir }}/masakari-logs': logs
|
||||
|
||||
- job:
|
||||
name: openstacksdk-functional-devstack-manila
|
||||
parent: openstacksdk-functional-devstack-minimum
|
||||
description: |
|
||||
Run openstacksdk functional tests against a master devstack with manila
|
||||
required-projects:
|
||||
- openstack/manila
|
||||
- name: openstack/openstacksdk
|
||||
override-branch: feature/r1
|
||||
vars:
|
||||
devstack_localrc:
|
||||
# Set up manila with a fake driver - makes things super fast and should
|
||||
# have no impact on the API
|
||||
MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE: false
|
||||
SHARE_DRIVER: manila.tests.share.drivers.dummy.DummyDriver
|
||||
MANILA_CONFIGURE_GROUPS: alpha,beta,gamma,membernet
|
||||
MANILA_CONFIGURE_DEFAULT_TYPES: true
|
||||
MANILA_SERVICE_IMAGE_ENABLED: false
|
||||
MANILA_SHARE_MIGRATION_PERIOD_TASK_INTERVAL: 1
|
||||
MANILA_SERVER_MIGRATION_PERIOD_TASK_INTERVAL: 10
|
||||
MANILA_REPLICA_STATE_UPDATE_INTERVAL: 10
|
||||
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS: 'snapshot_support=True create_share_from_snapshot_support=True revert_to_snapshot_support=True mount_snapshot_support=True'
|
||||
MANILA_ENABLED_BACKENDS: alpha,beta,gamma
|
||||
MANILA_OPTGROUP_alpha_driver_handles_share_servers: false
|
||||
MANILA_OPTGROUP_alpha_replication_domain: DUMMY_DOMAIN
|
||||
MANILA_OPTGROUP_alpha_share_backend_name: ALPHA
|
||||
MANILA_OPTGROUP_alpha_share_driver: manila.tests.share.drivers.dummy.DummyDriver
|
||||
MANILA_OPTGROUP_beta_driver_handles_share_servers: false
|
||||
MANILA_OPTGROUP_beta_replication_domain: DUMMY_DOMAIN
|
||||
MANILA_OPTGROUP_beta_share_backend_name: BETA
|
||||
MANILA_OPTGROUP_beta_share_driver: manila.tests.share.drivers.dummy.DummyDriver
|
||||
MANILA_OPTGROUP_gamma_driver_handles_share_servers: true
|
||||
MANILA_OPTGROUP_gamma_network_config_group: membernet
|
||||
MANILA_OPTGROUP_gamma_share_backend_name: GAMMA
|
||||
MANILA_OPTGROUP_gamma_share_driver: manila.tests.share.drivers.dummy.DummyDriver
|
||||
MANILA_OPTGROUP_gamma_admin_network_config_group: membernet
|
||||
MANILA_OPTGROUP_membernet_network_api_class: manila.network.standalone_network_plugin.StandaloneNetworkPlugin
|
||||
MANILA_OPTGROUP_membernet_network_plugin_ipv4_enabled: true
|
||||
MANILA_OPTGROUP_membernet_standalone_network_plugin_allowed_ip_ranges: 10.0.0.10-10.0.0.209
|
||||
MANILA_OPTGROUP_membernet_standalone_network_plugin_gateway: 10.0.0.1
|
||||
MANILA_OPTGROUP_membernet_standalone_network_plugin_mask: 24
|
||||
MANILA_OPTGROUP_membernet_standalone_network_plugin_network_type: vlan
|
||||
MANILA_OPTGROUP_membernet_standalone_network_plugin_segmentation_id: 1010
|
||||
devstack_plugins:
|
||||
manila: https://opendev.org/openstack/manila
|
||||
devstack_services:
|
||||
c-api: false
|
||||
c-bak: false
|
||||
c-sch: false
|
||||
c-vol: false
|
||||
cinder: false
|
||||
s-account: false
|
||||
s-container: false
|
||||
s-object: false
|
||||
s-proxy: false
|
||||
n-api: false
|
||||
n-api-meta: false
|
||||
n-cauth: false
|
||||
n-cond: false
|
||||
n-cpu: false
|
||||
n-novnc: false
|
||||
n-obj: false
|
||||
n-sch: false
|
||||
nova: false
|
||||
placement-api: false
|
||||
dstat: false
|
||||
tox_environment:
|
||||
OPENSTACKSDK_HAS_MANILA: 1
|
||||
OPENSTACKSDK_TESTS_SUBDIR: shared_file_system
|
||||
|
||||
- job:
|
||||
name: metalsmith-integration-openstacksdk-src
|
||||
parent: metalsmith-integration-glance-netboot-cirros-direct
|
||||
@ -393,6 +463,8 @@
|
||||
- openstacksdk-functional-devstack-senlin
|
||||
- openstacksdk-functional-devstack-magnum:
|
||||
voting: false
|
||||
- openstacksdk-functional-devstack-manila:
|
||||
voting: false
|
||||
- openstacksdk-functional-devstack-masakari:
|
||||
voting: false
|
||||
- openstacksdk-functional-devstack-ironic:
|
||||
|
@ -21,10 +21,19 @@ class BaseSharedFileSystemTest(base.BaseFunctionalTest):
|
||||
super(BaseSharedFileSystemTest, self).setUp()
|
||||
self.require_service('shared-file-system',
|
||||
min_microversion=self.min_microversion)
|
||||
self._set_operator_cloud(shared_file_system_api_version='2.63')
|
||||
self._set_user_cloud(shared_file_system_api_version='2.63')
|
||||
|
||||
def create_share(self, **kwargs):
|
||||
share = self.conn.share.create_share(**kwargs)
|
||||
self.addCleanup(self.conn.share.delete_share, share.id,
|
||||
share = self.user_cloud.share.create_share(**kwargs)
|
||||
self.addCleanup(self.user_cloud.share.delete_share,
|
||||
share.id,
|
||||
ignore_missing=True)
|
||||
self.user_cloud.share.wait_for_status(
|
||||
share,
|
||||
status='available',
|
||||
failures=['error'],
|
||||
interval=5,
|
||||
wait=self._wait_for_timeout)
|
||||
self.assertIsNotNone(share.id)
|
||||
return share
|
||||
|
@ -18,7 +18,7 @@ class AvailabilityZoneTest(base.BaseSharedFileSystemTest):
|
||||
min_microversion = '2.7'
|
||||
|
||||
def test_availability_zones(self):
|
||||
azs = self.conn.shared_file_system.availability_zones()
|
||||
azs = self.user_cloud.shared_file_system.availability_zones()
|
||||
self.assertGreater(len(list(azs)), 0)
|
||||
for az in azs:
|
||||
for attribute in ('id', 'name', 'created_at', 'updated_at'):
|
||||
|
@ -20,41 +20,26 @@ class ShareTest(base.BaseSharedFileSystemTest):
|
||||
super(ShareTest, self).setUp()
|
||||
|
||||
self.SHARE_NAME = self.getUniqueString()
|
||||
my_share = self.conn.shared_file_system.create_share(
|
||||
my_share = self.create_share(
|
||||
name=self.SHARE_NAME, size=2, share_type="dhss_false",
|
||||
share_protocol='NFS', description=None)
|
||||
self.conn.shared_file_system.wait_for_status(
|
||||
my_share,
|
||||
status='available',
|
||||
failures=['error'],
|
||||
interval=5,
|
||||
wait=self._wait_for_timeout)
|
||||
self.assertIsNotNone(my_share)
|
||||
self.assertIsNotNone(my_share.id)
|
||||
self.SHARE_ID = my_share.id
|
||||
|
||||
def tearDown(self):
|
||||
sot = self.conn.shared_file_system.delete_share(
|
||||
self.SHARE_ID,
|
||||
ignore_missing=True)
|
||||
self.assertIsNone(sot)
|
||||
super(ShareTest, self).tearDown()
|
||||
|
||||
def test_get(self):
|
||||
sot = self.conn.shared_file_system.get_share(self.SHARE_ID)
|
||||
sot = self.user_cloud.share.get_share(self.SHARE_ID)
|
||||
assert isinstance(sot, _share.Share)
|
||||
self.assertEqual(self.SHARE_ID, sot.id)
|
||||
|
||||
def test_list_share(self):
|
||||
shares = self.conn.shared_file_system.shares(details=False)
|
||||
shares = self.user_cloud.share.shares(details=False)
|
||||
self.assertGreater(len(list(shares)), 0)
|
||||
for share in shares:
|
||||
for attribute in ('id', 'name', 'created_at', 'updated_at'):
|
||||
self.assertTrue(hasattr(share, attribute))
|
||||
|
||||
def test_update(self):
|
||||
updated_share = self.conn.shared_file_system.update_share(
|
||||
updated_share = self.user_cloud.share.update_share(
|
||||
self.SHARE_ID, display_description='updated share')
|
||||
get_updated_share = self.conn.shared_file_system.get_share(
|
||||
get_updated_share = self.user_cloud.share.get_share(
|
||||
updated_share.id)
|
||||
self.assertEqual('updated share', get_updated_share.description)
|
||||
|
Loading…
Reference in New Issue
Block a user