summaryrefslogtreecommitdiff
path: root/cinderclient/tests/functional
diff options
context:
space:
mode:
authorKyrylo Romanenko <kromanenko@mirantis.com>2015-06-08 17:10:23 +0300
committerKyrylo Romanenko <kromanenko@mirantis.com>2015-06-18 11:29:21 +0300
commit1fea0d8b87434b9940b088cdda4dfdb7bf62da75 (patch)
tree61bb4221ebc8c263c2dbdc31174c7b2f66f138bb /cinderclient/tests/functional
parent91bf760989a6c992918d6eadb038d7265ea18287 (diff)
downloadpython-cinderclient-1fea0d8b87434b9940b088cdda4dfdb7bf62da75.tar.gz
Add tests for python-cinderclient and style fix
Add test for cinder extra-specs-list command output. Add test for cinder list-extension command output. Fix pep8 issues "E128 continuation line under-indented for visual indent" in other functions. Change-Id: I28266af7a6ff23b83899c50cc230f926a44592dc Partial-Bug: #1463404
Diffstat (limited to 'cinderclient/tests/functional')
-rw-r--r--cinderclient/tests/functional/test_readonly_cli.py29
1 files changed, 20 insertions, 9 deletions
diff --git a/cinderclient/tests/functional/test_readonly_cli.py b/cinderclient/tests/functional/test_readonly_cli.py
index bc5e521..cd62972 100644
--- a/cinderclient/tests/functional/test_readonly_cli.py
+++ b/cinderclient/tests/functional/test_readonly_cli.py
@@ -38,14 +38,14 @@ class CinderClientReadOnlyTests(base.ClientTestBase):
def test_backup_list(self):
backup_list = self.cinder('backup-list')
self.assertTableHeaders(backup_list, ['ID', 'Volume ID', 'Status',
- 'Name', 'Size', 'Object Count',
- 'Container'])
+ 'Name', 'Size', 'Object Count',
+ 'Container'])
def test_encryption_type_list(self):
encrypt_list = self.cinder('encryption-type-list')
self.assertTableHeaders(encrypt_list, ['Volume Type ID', 'Provider',
- 'Cipher', 'Key Size',
- 'Control Location'])
+ 'Cipher', 'Key Size',
+ 'Control Location'])
def test_endpoints(self):
out = self.cinder('endpoints')
@@ -55,11 +55,16 @@ class CinderClientReadOnlyTests(base.ClientTestBase):
self.assertTrue(2 >= len(headers))
self.assertEqual('Value', headers[1])
+ def test_extra_specs_list(self):
+ extra_specs_list = self.cinder('extra-specs-list')
+ self.assertTableHeaders(extra_specs_list, ['ID', 'Name',
+ 'extra_specs'])
+
def test_list(self):
list = self.cinder('list')
self.assertTableHeaders(list, ['ID', 'Status', 'Name', 'Size',
- 'Volume Type', 'Bootable',
- 'Attached to'])
+ 'Volume Type', 'Bootable',
+ 'Attached to'])
def test_qos_list(self):
qos_list = self.cinder('qos-list')
@@ -68,17 +73,18 @@ class CinderClientReadOnlyTests(base.ClientTestBase):
def test_rate_limits(self):
rate_limits = self.cinder('rate-limits')
self.assertTableHeaders(rate_limits, ['Verb', 'URI', 'Value', 'Remain',
- 'Unit', 'Next_Available'])
+ 'Unit', 'Next_Available'])
def test_service_list(self):
service_list = self.cinder('service-list')
self.assertTableHeaders(service_list, ['Binary', 'Host', 'Zone',
- 'Status', 'State', 'Updated_at'])
+ 'Status', 'State',
+ 'Updated_at'])
def test_snapshot_list(self):
snapshot_list = self.cinder('snapshot-list')
self.assertTableHeaders(snapshot_list, ['ID', 'Volume ID', 'Status',
- 'Name', 'Size'])
+ 'Name', 'Size'])
def test_transfer_list(self):
transfer_list = self.cinder('transfer-list')
@@ -87,3 +93,8 @@ class CinderClientReadOnlyTests(base.ClientTestBase):
def test_type_list(self):
type_list = self.cinder('type-list')
self.assertTableHeaders(type_list, ['ID', 'Name'])
+
+ def test_list_extensions(self):
+ list_extensions = self.cinder('list-extensions')
+ self.assertTableHeaders(list_extensions, ['Name', 'Summary', 'Alias',
+ 'Updated'])