You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by er...@apache.org on 2017/04/28 12:28:22 UTC

libcloud git commit: [google] Add test to check that can create a GCE volume at a given location

Repository: libcloud
Updated Branches:
  refs/heads/trunk 30c6f9cb6 -> 408caa9c9


[google] Add test to check that can create a GCE volume at a given location

Closes #1048

Signed-off-by: Eric Johnson <er...@google.com>


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

Branch: refs/heads/trunk
Commit: 408caa9c95a197578baede0a5a1476e9201486e7
Parents: 30c6f9c
Author: Francisco Ros <fj...@doalitic.com>
Authored: Thu Apr 27 20:22:34 2017 +0200
Committer: Eric Johnson <er...@google.com>
Committed: Fri Apr 28 12:27:45 2017 +0000

----------------------------------------------------------------------
 CHANGES.rst                       | 4 ++++
 libcloud/test/compute/test_gce.py | 8 ++++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/408caa9c/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 4f6f0d4..6e914b6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -41,6 +41,10 @@ Common
 Compute
 ~~~~~~~
 
+- [GOOGLE] Add test to check that can create a GCE volume at a given location
+  [GITHUB-1048]
+  (Francisco Ros)
+
 - [GOOGLE] Fix GCENodeDriver.ex_get_volume() when zone param is of class GCEZone or NodeLocation
   [GITHUB-1047]
   (Francisco Ros)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/408caa9c/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index f7c70be..8332f08 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -1317,6 +1317,14 @@ class GCENodeDriverTest(GoogleTestCase, TestCaseMixin):
         self.assertRaises(ValueError, self.driver.create_volume, size,
                           volume_name, image=image, ex_image_family='coreos')
 
+    def test_create_volume_location(self):
+        volume_name = 'lcdisk'
+        size = 10
+        zone = self.driver.zone
+        volume = self.driver.create_volume(size, volume_name, location=zone)
+        self.assertTrue(isinstance(volume, StorageVolume))
+        self.assertEqual(volume.name, volume_name)
+
     def test_ex_create_volume_snapshot(self):
         snapshot_name = 'lcsnapshot'
         volume = self.driver.ex_get_volume('lcdisk')