summaryrefslogtreecommitdiff
path: root/cinderclient
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-25 02:17:12 +0000
committerGerrit Code Review <review@openstack.org>2018-06-25 02:17:12 +0000
commitd8b25483afa63333db389f0809f581dd1099fb65 (patch)
tree4ea2b57143176571391d428094207085e75e11a6 /cinderclient
parenta4fc1416ef43669aafd7dca6e95d68b4119fded5 (diff)
parent9aa1c9a485e8c858ce8e022be0df79f798dea65c (diff)
downloadpython-cinderclient-d8b25483afa63333db389f0809f581dd1099fb65.tar.gz
Merge "Use api version 3 for functional test"
Diffstat (limited to 'cinderclient')
-rw-r--r--cinderclient/tests/functional/test_cli.py13
-rw-r--r--cinderclient/tests/functional/test_volume_create_cli.py2
2 files changed, 11 insertions, 4 deletions
diff --git a/cinderclient/tests/functional/test_cli.py b/cinderclient/tests/functional/test_cli.py
index 8047459..bfa653f 100644
--- a/cinderclient/tests/functional/test_cli.py
+++ b/cinderclient/tests/functional/test_cli.py
@@ -17,7 +17,14 @@ from cinderclient.tests.functional import base
class CinderVolumeTests(base.ClientTestBase):
"""Check of base cinder volume commands."""
- VOLUME_PROPERTY = ('attachment_ids', 'attached_servers',
+ CREATE_VOLUME_PROPERTY = ('attachments', 'multiattach',
+ 'os-vol-tenant-attr:tenant_id',
+ 'availability_zone', 'bootable',
+ 'created_at', 'description', 'encrypted', 'id',
+ 'metadata', 'name', 'size', 'status',
+ 'user_id', 'volume_type')
+
+ SHOW_VOLUME_PROPERTY = ('attachment_ids', 'attached_servers',
'availability_zone', 'bootable',
'created_at', 'description', 'encrypted', 'id',
'metadata', 'name', 'size', 'status',
@@ -26,7 +33,7 @@ class CinderVolumeTests(base.ClientTestBase):
def test_volume_create_delete_id(self):
"""Create and delete a volume by ID."""
volume = self.object_create('volume', params='1')
- self.assert_object_details(self.VOLUME_PROPERTY, volume.keys())
+ self.assert_object_details(self.CREATE_VOLUME_PROPERTY, volume.keys())
self.object_delete('volume', volume['id'])
self.check_object_deleted('volume', volume['id'])
@@ -44,7 +51,7 @@ class CinderVolumeTests(base.ClientTestBase):
output = self.cinder('show', params='TestVolumeShow')
volume = self._get_property_from_output(output)
self.assertEqual('TestVolumeShow', volume['name'])
- self.assert_object_details(self.VOLUME_PROPERTY, volume.keys())
+ self.assert_object_details(self.SHOW_VOLUME_PROPERTY, volume.keys())
self.object_delete('volume', volume['id'])
self.check_object_deleted('volume', volume['id'])
diff --git a/cinderclient/tests/functional/test_volume_create_cli.py b/cinderclient/tests/functional/test_volume_create_cli.py
index c93a31b..5368510 100644
--- a/cinderclient/tests/functional/test_volume_create_cli.py
+++ b/cinderclient/tests/functional/test_volume_create_cli.py
@@ -27,7 +27,7 @@ class CinderVolumeNegativeTests(base.ClientTestBase):
@ddt.data(
('', (r'Size is a required parameter')),
('-1', (r'Invalid volume size provided for create request')),
- ('0', (r'Invalid input received')),
+ ('0', (r"Volume size '0' must be an integer and greater than 0")),
('size', (r'invalid int value')),
('0.2', (r'invalid int value')),
('2 GB', (r'unrecognized arguments')),