From: ldimaggi@sourceware.org <ldimaggi@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/test CGA_0160_Add_User.py conga_Hel ...
Date: 9 Feb 2007 03:23:18 -0000 [thread overview]
Message-ID: <20070209032318.12119.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: ldimaggi at sourceware.org 2007-02-09 03:23:17
Modified files:
luci/test : CGA_0160_Add_User.py conga_Helpers.py
conga_suite.py
Log message:
Cleaned up logic error.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0160_Add_User.py.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_Helpers.py.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_suite.py.diff?cvsroot=cluster&r1=1.8&r2=1.9
--- conga/luci/test/CGA_0160_Add_User.py 2006/12/08 16:17:23 1.5
+++ conga/luci/test/CGA_0160_Add_User.py 2007/02/09 03:23:17 1.6
@@ -53,10 +53,18 @@
import unittest, time, re
from conga_Helpers import *
import time
+import logging
+from loggerObject import loggerObject
class CGA_0160_Add_User (unittest.TestCase):
- def setUp(self):
+ def setUp(self):
+
+ # Set up logging
+ self.theloggerObject = setupLogger (CONGA_DEBUG_LOG)
+ self.logger = self.theloggerObject.getLogger()
+ self.logger.info('-----------------------------------------------------------')
+
"""Establish connection to selenium server, login to luci """
self.verificationErrors = []
self.selenium = login (CONGA_ADMIN_USERNAME, CONGA_ADMIN_PASSWORD)
@@ -66,7 +74,7 @@
# Create the storage systems
for systemName in CONGA_STORAGE_SYSTEMS:
- createStorageSystem(sel, systemName, CONGA_STORAGE_SYSTEMS[systemName])
+ createStorageSystem(sel, systemName, CONGA_STORAGE_SYSTEMS[systemName], self.logger)
# Validation - verify that the success message was displayed for each storage system
self.assertEqual("Do you really want to add the following Storage Systems:\n" + systemName, sel.get_confirmation())
sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
@@ -78,7 +86,7 @@
# Create the users
for userName in CONGA_USERS.keys():
- createUser (sel, userName, CONGA_USERS[userName])
+ createUser (sel, userName, CONGA_USERS[userName], self.logger)
# Validation - verify that the success message was displayed for each user
self.assertEqual('Do you really want to add the user "' + userName + '"?', sel.get_confirmation())
sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
@@ -91,7 +99,7 @@
# Assign permissions to users as defined in CONGA_USERS_SYSTEMS
for userName in CONGA_USERS_SYSTEMS:
# Temporary - 20061205 - only tng3-2, 3-3, and 3-5 are reliable systems right now
- if ((userName == 'user2') or (userName == 'user3') or (userName == 'user5') ):
+ #if ((userName == 'user2') or (userName == 'user3') or (userName == 'user5') ):
systemName = CONGA_USERS_SYSTEMS[userName]
# Replace . with _ in system name to match HTML
systemNameMod = systemName.replace('.', '_')
@@ -117,6 +125,8 @@
def test_create_users_systems(self):
"""Test to verify user permissions - control of access to view systems"""
+ self.logger.info('Starting test case CGA_0160_Add_User.test_create_users_systems')
+
# Validation: Two part test:
# 1) Verify that the loggedin user can see the systems for which they have authorization
# 2) Verify that the loggedin user cannot see any other systems
@@ -127,7 +137,7 @@
sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
for userName in CONGA_USERS_SYSTEMS:
- if ((userName == 'user2') or (userName == 'user3') or (userName == 'user5') ):
+ #print "DEBUG - loggedInUser=" + loggedInUser + " userName=" + userName
if (loggedInUser == userName):
# Validation 1 - seeing authorized systems
print 'Verify user ' + userName + ' is able to access authorized systems'
@@ -156,7 +166,9 @@
print 'Verify user ' + loggedInUser + ' is not able to access unauthorized system ' + CONGA_USERS_SYSTEMS[userName]
self.assertFalse (sel.is_text_present(CONGA_USERS_SYSTEMS[userName]))
- logout(self.selenium)
+ logout(self.selenium)
+
+ self.logger.info('Ending test case CGA_0160_Add_User.test_create_users_systems')
def tearDown(self):
# login as admin
@@ -174,7 +186,7 @@
# Delete the storage systems
for systemName in CONGA_STORAGE_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)
@@ -186,7 +198,7 @@
# Delete the users
for userName in CONGA_USERS.keys():
- deleteUser (sel, userName)
+ deleteUser (sel, userName, self.logger)
# Validation - verify that the success message was displayed for each user
self.assertEqual('Do you really want to remove the user "' + userName + '"?', sel.get_confirmation())
sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY)
@@ -195,6 +207,7 @@
"""Logout and stop Selenium session"""
logout(self.selenium)
self.assertEqual([], self.verificationErrors)
+ closeLogger (self.theloggerObject)
def suite():
suite = unittest.TestSuite()
--- conga/luci/test/conga_Helpers.py 2007/02/05 17:30:49 1.11
+++ conga/luci/test/conga_Helpers.py 2007/02/09 03:23:17 1.12
@@ -45,25 +45,25 @@
# 20061130 - Node tng3-1 isn't booting, node tng3-4 is having some problems too
-CONGA_STORAGE_SYSTEMS = { 'tng3-1.lab.msp.redhat.com':'password',
- 'tng3-2.lab.msp.redhat.com':'password',
+CONGA_STORAGE_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',
'tng3-5.lab.msp.redhat.com':'password'}
-CONGA_SMALL_CLUSTER_SYSTEMS = { 'tng3-1.lab.msp.redhat.com':'password',
- 'tng3-2.lab.msp.redhat.com':'password',
+CONGA_SMALL_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_LARGE_CLUSTER_SYSTEMS = {'tng3-1.lab.msp.redhat.com':'password',
- 'tng3-2.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',
'tng3-5.lab.msp.redhat.com':'password'}
-CONGA_USERS = {'user1':'user1_password',
- 'user2':'user2_password',
+CONGA_USERS = {#'user1':'user1_password',
+ #'user2':'user2_password',
'user3':'user3_password',
'user4':'user4_password',
'user5':'user5_password',
@@ -73,16 +73,12 @@
'user9':'user9_password',
'user10':'user10_password'}
-CONGA_USERS_SYSTEMS = {'user1':'tng3-1.lab.msp.redhat.com',
- 'user2':'tng3-2.lab.msp.redhat.com',
+CONGA_USERS_SYSTEMS = {#'user1':'tng3-1.lab.msp.redhat.com',
+ #'user2':'tng3-2.lab.msp.redhat.com',
'user3':'tng3-3.lab.msp.redhat.com',
'user4':'tng3-4.lab.msp.redhat.com',
- 'user5':'tng3-5.lab.msp.redhat.com',
- 'user6':'tng3-1.lab.msp.redhat.com',
- 'user7':'tng3-2.lab.msp.redhat.com',
- 'user8':'tng3-3.lab.msp.redhat.com',
- 'user9':'tng3-4.lab.msp.redhat.com',
- 'user10':'tng3-5.lab.msp.redhat.com'}
+ 'user5':'tng3-5.lab.msp.redhat.com'
+ }
# Data used to verify the on-line help contents. The Dictionary contains
# strings and offsets of the strings in the help as of 20061207
--- conga/luci/test/conga_suite.py 2007/02/05 17:30:49 1.8
+++ conga/luci/test/conga_suite.py 2007/02/09 03:23:17 1.9
@@ -68,8 +68,8 @@
# Assemble the suite
suite = unittest.TestSuite()
#suite.addTest(congaDemoSuite)
-#suite.addTest(CGA_0160_Add_UserSuite)
-suite.addTest(CGA_0170_Online_Documentation_Portlet_Suite)
+suite.addTest(CGA_0160_Add_UserSuite)
+#suite.addTest(CGA_0170_Online_Documentation_Portlet_Suite)
#suite.addTest(CGA_0200_Create_cluster_Suite)
# Run the test suite
next reply other threads:[~2007-02-09 3:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 3:23 ldimaggi [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-02-10 0:01 [Cluster-devel] conga/luci/test CGA_0160_Add_User.py conga_Hel rmccabe
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=20070209032318.12119.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.