summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2010-06-15 15:28:16 +0000
committerBill Peck <bpeck@redhat.com>2010-06-15 15:28:16 +0000
commitdf371119a006786cad33348fa3ed860a695cdfb6 (patch)
tree35945a3998746d428db30e7c5b93daa96875c886
parent612f292a04494de5b13e8a46eccb6c01c878358d (diff)
-rwxr-xr-xTasks/distribution/beaker/setup/add_labcontroller.py4
-rwxr-xr-xTasks/distribution/beaker/setup/add_user.py4
-rwxr-xr-xTasks/distribution/beaker/setup/runtest.sh24
3 files changed, 14 insertions, 18 deletions
diff --git a/Tasks/distribution/beaker/setup/add_labcontroller.py b/Tasks/distribution/beaker/setup/add_labcontroller.py
index 28185c3..7c8a327 100755
--- a/Tasks/distribution/beaker/setup/add_labcontroller.py
+++ b/Tasks/distribution/beaker/setup/add_labcontroller.py
@@ -25,14 +25,14 @@ if not labcontroller:
usage()
# login
-go("http://localhost/login")
+go("http://localhost/bkr/login")
formclear(1)
fv("1","user_name","admin")
fv("1","password","testing")
submit('login')
# Add lab controller
-go("/labcontrollers/new")
+go("/bkr/labcontrollers/new")
code(200)
formclear(1)
fv("1","fqdn",labcontroller)
diff --git a/Tasks/distribution/beaker/setup/add_user.py b/Tasks/distribution/beaker/setup/add_user.py
index f2c5b85..85abd70 100755
--- a/Tasks/distribution/beaker/setup/add_user.py
+++ b/Tasks/distribution/beaker/setup/add_user.py
@@ -28,14 +28,14 @@ if not user:
usage()
# login
-go("http://localhost/login")
+go("http://localhost/bkr/login")
formclear(1)
fv("1","user_name","admin")
fv("1","password","testing")
submit('login')
# Add user
-go("/users/new")
+go("/bkr/users/new")
code(200)
formclear(1)
fv("1","user_name", user)
diff --git a/Tasks/distribution/beaker/setup/runtest.sh b/Tasks/distribution/beaker/setup/runtest.sh
index d3bf7d1..7bfd9c5 100755
--- a/Tasks/distribution/beaker/setup/runtest.sh
+++ b/Tasks/distribution/beaker/setup/runtest.sh
@@ -288,21 +288,19 @@ function Inventory()
service iptables stop
# Turn on wsgi
perl -pi -e 's|^#LoadModule wsgi_module modules/mod_wsgi.so|LoadModule wsgi_module modules/mod_wsgi.so|g' /etc/httpd/conf.d/wsgi.conf
- service httpd start
+ service httpd restart
estatus_fail "**** Failed to start httpd ****"
# Add the lab controller
./add_labcontroller.py -l $CLIENT
./add_user.py -u host/$CLIENT
estatus_fail "**** Failed to add lab controller ****"
- rhts-sync-set -s READY
+ rhts-sync-set -s SERVERREADY
rhts-sync-block -s DONE -s ABORT $CLIENT
result_pass
}
function LabController()
{
- # We only want the first one
- SERVER=$(echo $SERVERS| awk '{print $1}')
# limit to only ipv4 address
ipaddress=$(host $HOSTNAME | awk '/has address/ {print $NF}')
yum install -y python-twill
@@ -317,7 +315,7 @@ function LabController()
perl -pi -e "s|^pxe_just_once: 0|pxe_just_once: 1|g" /etc/cobbler/settings
perl -pi -e "s|^anamon_enabled: 0|anamon_enabled: 1|g" /etc/cobbler/settings
perl -pi -e "s|^anamon_enabled: 0|anamon_enabled: 1|g" /etc/cobbler/settings
- perl -pi -e "s|^redhat_management_server: .*|redhat_management_server: \"https://testuser:testpassword\@$SERVER\"|g" /etc/cobbler/settings
+ perl -pi -e "s|^redhat_management_server: .*|redhat_management_server: \"$SERVER_URL\"|g" /etc/cobbler/settings
echo "rcm: \"http://rcm-xmlrpc.build.bos.redhat.com/rcm\"" >> /etc/cobbler/settings
#FIXME edit /etc/cobbler/modules.conf
# enable testing auth module
@@ -327,14 +325,14 @@ function LabController()
semanage fcontext -a -t public_content_t "/var/www/cobbler/images/.*"
# Turn on wsgi
perl -pi -e 's|^#LoadModule wsgi_module modules/mod_wsgi.so|LoadModule wsgi_module modules/mod_wsgi.so|g' /etc/httpd/conf.d/wsgi.conf
- service httpd start
+ service httpd restart
service xinetd start
service cobblerd start
cobbler get-loaders
#service autofs start
service iptables stop
rhts-sync-set -s READY
- abort=$(rhts-sync-block -s READY -s ABORT $SERVER)
+ abort=$(rhts-sync-block -s SERVERREADY -s ABORT $SERVER)
echo "abort=$abort"
# Add some distros
# NFS format HOSTNAME:DISTRONAME:NFSPATH
@@ -419,16 +417,11 @@ function LabController()
result_pass
}
-if [ -z "$SERVERS" -o -z "$CLIENTS" ]; then
- echo "Can not determine my Role! Client/Server Failed:" | tee -a $OUTPUTFILE
- echo "If you are running in developer mode try setting" | tee -a $OUTPUTFILE
- echo "the environment variables CLIENTS and SERVERS" | tee -a $OUTPUTFILE
- report_result $TEST Warn
-fi
-
if $(echo $CLIENTS | grep -q $HOSTNAME); then
echo "Running test as Lab Controller" | tee -a $OUTPUTFILE
TEST="$TEST/lab_controller"
+ SERVER=$(echo $SERVERS | awk '{print $1}')
+ SERVER_URL="https://testuser:testpassword@$SERVER/bkr/"
LabController
fi
@@ -442,7 +435,10 @@ if $(echo $STANDALONE | grep -q $HOSTNAME); then
echo "Running test as both Lab Controller and Scheduler" | tee -a $OUTPUTFILE
CLIENTS=$STANDALONE
SERVERS=$STANDALONE
+ SERVER=$(echo $SERVERS | awk '{print $1}')
+ SERVER_URL="https://testuser:testpassword\@$SERVER/bkr"
TEST="$TEST/lab_controller" LabController &
+ sleep 120
TEST="$TEST/inventory" Inventory
fi