libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quent...@apache.org
Subject [1/4] libcloud git commit: Added tests.
Date Fri, 16 Mar 2018 15:15:44 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 0310ba9ed -> 68ba179d8


Added tests.

Signed-off-by: Quentin Pradet <quentinp@apache.org>


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

Branch: refs/heads/trunk
Commit: 4c638782c6c3f4d94ede6c1ff0c1fa6335e39ef8
Parents: 94db5c4
Author: Rahul Paigavan <rahul.paigavan@cambridgesemantics.com>
Authored: Thu Jan 25 21:12:49 2018 +0530
Committer: Quentin Pradet <quentinp@apache.org>
Committed: Fri Mar 16 09:00:05 2018 +0400

----------------------------------------------------------------------
 libcloud/test/compute/fixtures/gce/aggregated_disks.json | 4 ++--
 libcloud/test/compute/test_gce.py                        | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4c638782/libcloud/test/compute/fixtures/gce/aggregated_disks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_disks.json b/libcloud/test/compute/fixtures/gce/aggregated_disks.json
index e884940..4103785 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_disks.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_disks.json
@@ -107,7 +107,7 @@
         "description": "I'm a happy little persistent disk",
         "type": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/diskTypes/pd-standard",
         "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcnode-000",
-        "sizeGb": "10",
+        "sizeGb": "25",
         "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
         "sourceImageId": "17312518942796567789",
         "status": "READY",
@@ -122,7 +122,7 @@
         "description": "I'm a happy little persistent disk",
         "type": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/diskTypes/pd-standard",
         "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcnode-001",
-        "sizeGb": "10",
+        "sizeGb": "25",
         "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
         "sourceImageId": "17312518942796567791",
         "status": "READY",

http://git-wip-us.apache.org/repos/asf/libcloud/blob/4c638782/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 35aa4d8..3b5c5a6 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -1365,13 +1365,16 @@ class GCENodeDriverTest(GoogleTestCase, TestCaseMixin):
         image = self.driver.ex_get_image('debian-7')
         size = self.driver.ex_get_size('n1-standard-1')
         number = 2
+        disk_size = "25"
         nodes = self.driver.ex_create_multiple_nodes(base_name, size, image,
-                                                     number)
+                                                     number, ex_disk_size=disk_size)
         self.assertEqual(len(nodes), 2)
         self.assertTrue(isinstance(nodes[0], Node))
         self.assertTrue(isinstance(nodes[1], Node))
         self.assertEqual(nodes[0].name, '%s-000' % base_name)
         self.assertEqual(nodes[1].name, '%s-001' % base_name)
+        self.assertEqual(nodes[0].extra['boot_disk'].size, disk_size)
+        self.assertEqual(nodes[1].extra['boot_disk'].size, disk_size)
 
     def test_ex_create_multiple_nodes_image_family(self):
         base_name = 'lcnode'


Mime
View raw message