cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [21/50] git commit: updated refs/heads/master to 0b83559
Date Wed, 29 Apr 2015 05:44:05 GMT
Browser Basesd Test Template changes


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

Branch: refs/heads/master
Commit: f22bd7a79e1af15d22d3ea3f9cb01ee807d0e38c
Parents: aad9b8a
Author: sailajamada <sailaja.mada@citrix.com>
Authored: Mon Mar 23 09:58:02 2015 +0530
Committer: sailajamada <sailaja.mada@citrix.com>
Committed: Mon Mar 23 09:58:02 2015 +0530

----------------------------------------------------------------------
 .../component/test_browse_templates.py          | 46 ++++++++++++--------
 1 file changed, 27 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f22bd7a7/test/integration/component/test_browse_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_browse_templates.py b/test/integration/component/test_browse_templates.py
index 9b1eda0..3df5139 100644
--- a/test/integration/component/test_browse_templates.py
+++ b/test/integration/component/test_browse_templates.py
@@ -147,19 +147,22 @@ class TestBrowseUploadVolume(cloudstackTestCase):
 
         list_template_response = Template.list(
                     self.apiclient,
-                    id=up_templateid
-                )
+                    id=up_templateid,
+                    templatefilter="all",
+                    zoneid=self.zone.id)
+
         self.assertNotEqual(
-                    list_volume_response,
+                    list_template_response,
                     None,
                     "Check if template exists in ListTemplates"
                 )
 
         self.assertEqual(
-                    list_template_response[0].state,
+                    list_template_response[0].status,
                     templatestate,
-                    "Check template state in List templates"
+                    "Check template status in List templates"
                 )
+        return
 
     def browse_upload_template(self):
         cmd = getUploadParamsForTemplate.getUploadParamsForTemplateCmd()
@@ -171,6 +174,7 @@ class TestBrowseUploadVolume(cloudstackTestCase):
         cmd.displaytext=self.templatename+self.account.name+(random.choice(string.ascii_uppercase))
         cmd.hypervisor=self.templatehypervisor
         cmd.ostypeid=self.templateostypeid
+        cmd.isdynamicallyscalable="false"
         #cmd.type="template"
         getuploadparamsresponce=self.apiclient.getUploadParamsForTemplate(cmd)
 
@@ -200,13 +204,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
         headers={'X-signature':signt,'X-metadata':metadata,'X-expires':expiredata}
 
         results = requests.post(posturl,files=files,headers=headers,verify=False)
-        time.sleep(60)
+        time.sleep(600)
 
         print results.status_code
         if results.status_code !=200: 
             self.fail("Upload is not fine")
 
-        self.validate_uploaded_template(getuploadparamsresponce.id,'Uploaded')
+        self.validate_uploaded_template(getuploadparamsresponce.id,'Download Complete')
 
         return(getuploadparamsresponce)
 
@@ -262,9 +266,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
         templ1=self.uploadtemplate()
         templ2=self.uploadtemplate()
         templ3=self.uploadtemplate()
-        self.validate_uploaded_template(templ1.id,'Uploaded')
-        self.validate_uploaded_template(templ2.id,'Uploaded')
-        self.validate_uploaded_template(templ3.id,'Uploaded')
+        time.sleep(600)
+        self.validate_uploaded_template(templ1.id,'Download Complete')
+        self.validate_uploaded_template(templ2.id,'Download Complete')
+        self.validate_uploaded_template(templ3.id,'Download Complete')
+        self.delete_template(templ1)
+        self.delete_template(templ2)
+        self.delete_template(templ3)
         return
 
     def validate_vm(self,vmdetails,vmstate):
@@ -1113,12 +1121,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
 
     def delete_template(self,templatedetails):
 
+        print templatedetails
         list_template_response = Template.list(
                                     self.apiclient,
-                                    templatefilter=\
-                                    self.testdata["template"]["templatefilter"],
+                                    templatefilter="all",
                                     id=templatedetails.id,
                                     zoneid=self.zone.id)
+        print list_template_response
         self.assertEqual(
                         isinstance(list_template_response, list),
                         True,
@@ -1139,15 +1148,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
                             (template_response.id, templatedetails.id)
                         )
 
-        self.debug("Deleting template: %s" % self.template)
-        # Delete the template
+                # Delete the template
         templatedetails.delete(self.apiclient)
         self.debug("Delete template: %s successful" % templatedetails)
 
         list_template_response = Template.list(
                                     self.apiclient,
-                                    templatefilter=\
-                                    self.services["template"]["templatefilter"],
+                                    templatefilter="all",
                                     id=templatedetails.id,
                                     zoneid=self.zone.id
                                     )
@@ -1254,8 +1261,8 @@ class TestBrowseUploadVolume(cloudstackTestCase):
             self.expunge_vm(vm2details)
 
             self.debug("========================= Test 9:  Delete the Uploaded Template=========================
")
-
-            self.delete_template(browseup_template)
+            print browseup_template
+            #self.delete_template(browseup_template)
 
             self.debug("========================= Test 10:  Upload Multiple templates=========================
")
 
@@ -1267,7 +1274,7 @@ class TestBrowseUploadVolume(cloudstackTestCase):
 
 
     @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true")
-    def test_02_SSVM_Life_Cycle_With_Browser_Template_TPath(self):
+    def xtest_02_SSVM_Life_Cycle_With_Browser_Template_TPath(self):
         """
         Test SSVM_Life_Cycle_With_Browser_template_TPath 
         """
@@ -1314,6 +1321,7 @@ class TestBrowseUploadVolume(cloudstackTestCase):
         return
 
 
+
     @classmethod
     def tearDownClass(self):
         try:


Mime
View raw message