Codebase list cinder-tempest-plugin / c82162a
Add test for volume create with non-ascii characters This test was uploaded since there was a bug [1] while creating a volume snapshot if the description of the parent volume contains non-ascii code. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1383899 Related-bug: #1393871 Closes-Bug: #1736676 Change-Id: I9fc41a426b29fad4f4d42a584325f0465a20effe lkuchlan authored 8 years ago Sean McGinnis committed 8 years ago
1 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1717 from tempest import config
1818 from tempest.lib.common.utils import data_utils
1919 from tempest.lib.common.utils import test_utils
20 from tempest.lib import decorators
21 import testtools
2022
2123 from cinder_tempest_plugin.api.volume import base
2224
6163 fetched_volume = result['volume']
6264 self.assertEqual(fetched_volume['name'],
6365 self.volume_name)
66
67 @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,
68 "Cinder volume snapshots are disabled")
69 @decorators.related_bug('1393871')
70 def test_snapshot_create_volume_description_non_ascii_code(self):
71 # Create a volume with non-ascii description
72 description = u'\u05e7\u05d9\u05d9\u05e4\u05e9'
73 volume = self.create_volume(description=description)
74 vol_info = self.volumes_client.show_volume(volume['id'])['volume']
75 self.assertEqual(description, vol_info['description'])
76
77 # Create a snapshot with different non-ascii description
78 description = u'\u4e2d\u56fd\u793e\u533a'
79 snapshot = self.create_snapshot(volume['id'], description=description)
80 snapshot_info = self.snapshots_client.show_snapshot(
81 snapshot['id'])['snapshot']
82 self.assertEqual(description, snapshot_info['description'])