You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/04/13 14:00:49 UTC

[3/5] libcloud git commit: expand test on disk attributes

expand test on disk attributes


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e69a7cb9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e69a7cb9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e69a7cb9

Branch: refs/heads/trunk
Commit: e69a7cb93a1077646786e447887bf31a0c9f9916
Parents: 5b01442
Author: Bernard Paques <be...@gmail.com>
Authored: Mon Feb 29 22:15:46 2016 +0100
Committer: anthony-shaw <an...@apache.org>
Committed: Wed Apr 13 21:58:36 2016 +1000

----------------------------------------------------------------------
 libcloud/test/compute/test_dimensiondata.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e69a7cb9/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 915ed53..7554410 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -111,6 +111,17 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
                                      ex_started=True, ex_state='fake_state',
                                      ex_network='fake_network', ex_network_domain='fake_network_domain')
         self.assertTrue(isinstance(ret, list))
+        self.assertEqual(len(ret), 7)
+
+        node = ret[3]
+        self.assertTrue(isinstance(node.extra['disks'], list))
+        self.assertTrue(isinstance(node.extra['disks'][0], DimensionDataServerDisk))
+        disk = node.extra['disks'][0]
+        self.assertEqual(disk.id, "c2e1f199-116e-4dbc-9960-68720b832b0a")
+        self.assertEqual(disk.scsi_id, 0)
+        self.assertEqual(disk.size_gb, 50)
+        self.assertEqual(disk.speed, "STANDARD")
+        self.assertEqual(disk.state, "NORMAL")
 
     def test_list_nodes_response_LOCATION(self):
         DimensionDataMockHttp.type = None