From: ldimaggi@sourceware.org <ldimaggi@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/test CGA_0200_Create_cluster.py con ...
Date: 20 Feb 2007 20:18:26 -0000 [thread overview]
Message-ID: <20070220201826.18208.qmail@sourceware.org> (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
--- conga/luci/test/CGA_0200_Create_cluster.py 2007/02/05 17:30:49 1.3
+++ conga/luci/test/CGA_0200_Create_cluster.py 2007/02/20 20:18:25 1.4
@@ -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):
--- conga/luci/test/congaDemoTests.py 2007/02/05 17:30:49 1.9
+++ conga/luci/test/congaDemoTests.py 2007/02/20 20:18:25 1.10
@@ -101,71 +101,6 @@
self.logger.info('Ending test case congaDemoTests.test_congaUsers')
- def test_congaCluster(self):
- """Test to create and delete a cluster"""
- self.logger.info('Starting test case congaDemoTests.test_congaCluster')
- sel = self.selenium
-
- sel.open("/luci/homebase")
- sel.click("link=cluster")
- sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
- sel.click("link=Create a New Cluster")
-
- # Create the new "testCluster" cluster
- sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
- sel.type("clusterName", "testCluster")
- self.logger.debug('Create cluster: testCluster')
-
- # Add the nodes to the cluster
- # Needed to generalize statements like this:
- # sel.type("__SYSTEM1:Addr", "tng3-2.lab.msp.redhat.com")
- # sel.type("__SYSTEM1:Passwd", "password")
- # sel.click("//input[@value='Add Another Row']")
- systemCounter = 0
- for systemName in CONGA_SMALL_CLUSTER_SYSTEMS.keys():
- sel.type("__SYSTEM" + str(systemCounter) + ":Addr", systemName)
- sel.type("__SYSTEM" + str(systemCounter) + ":Passwd", CONGA_SMALL_CLUSTER_SYSTEMS[systemName])
- systemCounter = systemCounter + 1
- if (systemCounter > 2):
- sel.click("//input[@value='Add another entry']")
- #sel.click("document.adminform.rhn_dl[1]")
- sel.click("Submit")
- sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
-
- self.assertEqual('Add the cluster "testCluster" to the Luci management interface?' , sel.get_confirmation())
- #sel.click("link=testCluster")
- sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
-
- # 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.click("link=Manage Systems")
- sel.wait_for_page_to_load("30000")
- 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'))
-
- # Delete the storage systems created when the cluster was created
- for systemName in CONGA_SMALL_CLUSTER_SYSTEMS:
- 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'))
-
- self.logger.info('Ending test case congaDemoTests.test_congaCluster')
-
def tearDown(self):
"""Logout and stop Selenium session"""
logout(self.selenium)
@@ -176,7 +111,6 @@
suite = unittest.TestSuite()
suite.addTest(congaDemoTests('test_congaStorage'))
suite.addTest(congaDemoTests('test_congaUsers'))
- #suite.addTest(congaDemoTests('test_congaCluster'))
return suite
if __name__ == "__main__":
--- conga/luci/test/conga_Helpers.py 2007/02/09 03:23:17 1.12
+++ conga/luci/test/conga_Helpers.py 2007/02/20 20:18:25 1.13
@@ -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',
--- conga/luci/test/conga_suite.py 2007/02/09 03:23:17 1.9
+++ conga/luci/test/conga_suite.py 2007/02/20 20:18:25 1.10
@@ -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)
next reply other threads:[~2007-02-20 20:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 20:18 ldimaggi [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-24 17:48 [Cluster-devel] conga/luci/test CGA_0200_Create_cluster.py con ldimaggi
2007-02-05 17:30 ldimaggi
2006-12-14 20:01 ldimaggi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070220201826.18208.qmail@sourceware.org \
--to=ldimaggi@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.