summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlkuchlan <lkuchlan@redhat.com>2017-12-03 09:09:47 +0200
committerSean McGinnis <sean.mcginnis@huawei.com>2018-03-12 14:43:07 -0500
commitc82162a385040fcf70444a10bae98ca3f2823bc2 (patch)
tree1a50c0409bb72e8776b8fb90f23a8c59fad63672
parent46b433ff4f37aa18e714cf8f7a55a22c470b6325 (diff)
downloadcinder-tempest-plugin-c82162a385040fcf70444a10bae98ca3f2823bc2.zip
cinder-tempest-plugin-c82162a385040fcf70444a10bae98ca3f2823bc2.tar.gz
cinder-tempest-plugin-c82162a385040fcf70444a10bae98ca3f2823bc2.tar.bz2
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
-rw-r--r--cinder_tempest_plugin/api/volume/test_volume_unicode.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/cinder_tempest_plugin/api/volume/test_volume_unicode.py b/cinder_tempest_plugin/api/volume/test_volume_unicode.py
index 84d43e4..35d0a54 100644
--- a/cinder_tempest_plugin/api/volume/test_volume_unicode.py
+++ b/cinder_tempest_plugin/api/volume/test_volume_unicode.py
@@ -18,6 +18,8 @@ from tempest.common import waiters
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
+from tempest.lib import decorators
+import testtools
from cinder_tempest_plugin.api.volume import base
@@ -62,3 +64,20 @@ class CinderUnicodeTest(base.BaseVolumeTest):
fetched_volume = result['volume']
self.assertEqual(fetched_volume['name'],
self.volume_name)
+
+ @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,
+ "Cinder volume snapshots are disabled")
+ @decorators.related_bug('1393871')
+ def test_snapshot_create_volume_description_non_ascii_code(self):
+ # Create a volume with non-ascii description
+ description = u'\u05e7\u05d9\u05d9\u05e4\u05e9'
+ volume = self.create_volume(description=description)
+ vol_info = self.volumes_client.show_volume(volume['id'])['volume']
+ self.assertEqual(description, vol_info['description'])
+
+ # Create a snapshot with different non-ascii description
+ description = u'\u4e2d\u56fd\u793e\u533a'
+ snapshot = self.create_snapshot(volume['id'], description=description)
+ snapshot_info = self.snapshots_client.show_snapshot(
+ snapshot['id'])['snapshot']
+ self.assertEqual(description, snapshot_info['description'])

This mirror site include all the OpenStack related repositories under: openstack, openstack-dev and openstack-infra.

NOTE: All repositories are updated every one hour.

Usage

For Git Clone
 git clone http://git.trystack.cn/openstack/nova.git 
For DevStack

Add GIT_BASE, NOVNC_REPO and SPICE_REPO variables to local.conf file.

[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git