Skip to contentSkip to conversation

conga/luci/test CGA_0200_Create_cluster.py con ...

Cluster-devel [email protected] 1 participant 1 message Feb 20, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: ldimaggi at sourceware.org 2007-02-20 20:18:25

Modified files:
luci/test : CGA_0200_Create_cluster.py congaDemoTests.py
conga_Helpers.py conga_suite.py

Log message:
Updating to match GUI changes

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0200_Create_cluster.py.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/congaDemoTests.py.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_Helpers.py.diff?cvsroot=cluster&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_suite.py.diff?cvsroot=cluster&r1=1.9&r2=1.10

luci/test/CGA_0200_Create_cluster.py +30 -16
@@ -73,7 +73,7 @@
             systemCounter = systemCounter + 1
             if (systemCounter > 2):
                 sel.click("//input[@value='Add Another Row']")          
-        sel.click("document.adminform.rhn_dl[1]")
+        #sel.click("document.adminform.rhn_dl[1]")
         sel.click("Submit")
         sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
 
@@ -81,34 +81,48 @@
         #sel.click("link=testCluster")
         sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
 
+        # Wait 5 minutes for the cluster nodes to be rebooted
+        time.sleep (300)
+
         # Validation - verify that the newly created cluster shows up in the cluster list        
         sel.click("link=homebase")
-        sel.wait_for_page_to_load("30000")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
         sel.click("link=Manage Systems")
-        sel.wait_for_page_to_load("30000")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
         self.assertTrue (sel.is_text_present('testCluster'))
         self.assertTrue (sel.is_element_present("name=__CLUSTER:testCluster"))
-
-        # Delete the cluster - note that this only deletes the reference to the cluster
-        # in the luci web app - need to build a way to delete /etc/cluster/cluster.conf
-        # and stop cman service on cluster nodes - TODO - see bug #
-        # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=213076        
-        self.logger.debug('Delete cluster: testCluster')
-        sel.click("name=__CLUSTER:testCluster")
-        sel.click("document.adminform.Submit")
-        sel.wait_for_page_to_load("30000")
-        self.assertEqual("Do you really want to remove the following managed systems:\nClusters:\n-testCluster", sel.get_confirmation())
-        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
-        self.assertTrue (sel.is_text_present('Removed cluster "testCluster" successfully'))
         
+        # Then - delete the cluster
+        sel.click("link=homebase")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        sel.click("link=cluster")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        sel.select("cluster_action", "label=Delete this cluster")
+        sel.click("//input[@value='Go']")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        sel.click("link=homebase")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        sel.click("link=Manage Systems")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)       
+
         # Delete the storage systems created when the cluster was created
         for systemName in CONGA_SMALL_CLUSTER_SYSTEMS:
-            deleteStorageSystem(sel, systemName)
+            deleteStorageSystem(sel, systemName, self.logger)
            # Validation - verify that the success message was displayed for each storage system
             self.assertEqual("Do you really want to remove the following managed systems:\nStorage Systems:\n-" + systemName, sel.get_confirmation())
             sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
             self.assertTrue (sel.is_text_present('Removed storage system "' + systemName + '" successfully'))
 
+        # And the cluster reference in the storage system list too
+        sel.click("link=homebase")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        sel.click("link=Manage Systems")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        sel.click("__CLUSTER0")
+        sel.click("document.adminform.Submit")
+        sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
+        self.assertEqual("Do you really want to remove the following managed systems:\nClusters:\n-testCluster", sel.get_confirmation())
+
         self.logger.info('Ending test case CGA_0200_Create_cluster.test_congaCluster')
 
     def tearDown(self):
luci/test/congaDemoTests.py +0 -66

78 lines not on this page · raw message

luci/test/conga_Helpers.py +2 -2
@@ -39,7 +39,7 @@
 CONGA_ADMIN_USERNAME = 'admin'
 CONGA_ADMIN_PASSWORD = 'password'
 CONGA_SERVER = 'http://tng3-5.lab.msp.redhat.com:8080'
-PAGE_DISPLAY_DELAY = '30000'
+PAGE_DISPLAY_DELAY = '60000'
 CONGA_LOG = '/var/tmp/congaTest.log'
 CONGA_DEBUG_LOG = '/var/tmp/congaTest_debug.log'
 
@@ -56,7 +56,7 @@
                          'tng3-3.lab.msp.redhat.com':'password',
                          'tng3-4.lab.msp.redhat.com':'password' }
 
-CONGA_LARGE_CLUSTER_SYSTEMS = {'tng3-1.lab.msp.redhat.com':'password', 
+CONGA_LARGE_CLUSTER_SYSTEMS = {#'tng3-1.lab.msp.redhat.com':'password', 
                          #'tng3-2.lab.msp.redhat.com':'password', 
                          'tng3-3.lab.msp.redhat.com':'password',
                          'tng3-4.lab.msp.redhat.com':'password',
luci/test/conga_suite.py +2 -2
@@ -68,9 +68,9 @@
 # Assemble the suite
 suite = unittest.TestSuite()
 #suite.addTest(congaDemoSuite)
-suite.addTest(CGA_0160_Add_UserSuite)
+#suite.addTest(CGA_0160_Add_UserSuite)
 #suite.addTest(CGA_0170_Online_Documentation_Portlet_Suite)
-#suite.addTest(CGA_0200_Create_cluster_Suite)
+suite.addTest(CGA_0200_Create_cluster_Suite)
 
 # Run the test suite
 unittest.TextTestRunner(verbosity=2).run(suite)