cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [2/2] git commit: updated refs/heads/4.2 to 3455a76
Date Sat, 10 Aug 2013 10:49:48 GMT
Add more debug logging to download detached volume test

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/4.2
Commit: 3455a76237481c3bbb590e88d37b6ca351c113fc
Parents: 99329df
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Sat Aug 10 16:18:29 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Sat Aug 10 16:18:29 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_volumes.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3455a762/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index dd3d8a4..b60b70e 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -521,13 +521,15 @@ class TestVolumes(cloudstackTestCase):
         #Attempt to download the volume and save contents locally
         try:
             formatted_url = urllib.unquote_plus(extract_vol.url)
+            self.debug("Attempting to download volume at url %s" % formatted_url)
             response = urllib.urlopen(formatted_url)
+            self.debug("response from volume url %s" % response.getcode())
             fd, path = tempfile.mkstemp()
+            self.debug("Saving volume %s to path %s" %(self.volume.id, path))
             os.close(fd)
-            fd = open(path, 'wb')
-            fd.write(response.read())
-            fd.close()
-
+            with open(path, 'wb') as fd:
+                fd.write(response.read())
+            self.debug("Saved volume successfully")
         except Exception:
             self.fail(
                 "Extract Volume Failed with invalid URL %s (vol id: %s)" \


Mime
View raw message