Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
more testing framework for cloud client test
Browse files Browse the repository at this point in the history
  • Loading branch information
BuzzTroll committed Aug 13, 2010
1 parent 8d25635 commit 8fe5c30
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 6 deletions.
35 changes: 35 additions & 0 deletions tests/autoconfig-decisions.sh.in
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is sourced by "autoconfig-adjustments.sh" before it runs.

# File contents injected @ Fri Aug 13 10:57:25 CDT 2010

NIMBUS_CONFIG_CONTAINER_RUNNER="@WHO@"
export NIMBUS_CONFIG_CONTAINER_RUNNER

NIMBUS_CONFIG_VMM_RUNNER="@WHO@"
export NIMBUS_CONFIG_VMM_RUNNER

NIMBUS_CONFIG_VMM_RUN_KEY="@KEY@"
export NIMBUS_CONFIG_VMM_RUN_KEY

NIMBUS_CONFIG_CONTAINER_HOSTNAME="localhost"
export NIMBUS_CONFIG_CONTAINER_HOSTNAME

NIMBUS_CONFIG_SSH_USE_CONTACT_STRING="@WHO@@localhost"
export NIMBUS_CONFIG_SSH_USE_CONTACT_STRING

NIMBUS_CONFIG_SSH_USE_CONTACT_PORT="22"
export NIMBUS_CONFIG_SSH_USE_CONTACT_PORT

NIMBUS_CONFIG_TEST_VMM="localhost"
export NIMBUS_CONFIG_TEST_VMM

NIMBUS_CONFIG_TEST_VMM_RAM="256"
export NIMBUS_CONFIG_TEST_VMM_RAM

NIMBUS_CONFIG_VMM_CONTROL_EXE="/home/nimbus/nimbus-controls-2.5/workspace-control/bin/workspace-control.sh"
export NIMBUS_CONFIG_VMM_CONTROL_EXE

NIMBUS_CONFIG_VMM_CONTROL_TMPDIR="/home/nimbus/nimbus-controls-2.5/workspace-control/var/workspace-control/tmp"
export NIMBUS_CONFIG_VMM_CONTROL_TMPDIR


15 changes: 10 additions & 5 deletions tests/bt-nimbus.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -83,40 +83,45 @@ echo $key


cp $install_dir/var/ca/ca-certs/* lib/certs/ cp $install_dir/var/ca/ca-certs/* lib/certs/
cp $cp conf/ cp $cp conf/

mv ~/.nimbus ~/.nimbus.bak
mkdir ~/.nimbus mkdir ~/.nimbus
mkdir ~/.globus
cp $cert ~/.nimbus/ cp $cert ~/.nimbus/
cp $key ~/.nimbus/ cp $key ~/.nimbus/
./bin/grid-proxy-init.sh cp -r ~/.nimbus ~/.globus


./bin/grid-proxy-init.sh


echo "=========================================" echo "========================================="
echo "Starting the services" echo "Starting the services"
echo "=========================================" echo "========================================="
cd $install_dir cd $install_dir
pkill cumulus
./bin/nimbusctl restart ./bin/nimbusctl restart
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "something somewhere went wrong. look through the output above" echo "something somewhere went wrong. look through the output above"
exit 1 exit 1
fi fi




echo $work_dir
export NIMBUS_HOME=$install_dir
export NIMBUS_TEST_USER=$user_name
echo "=========================================" echo "========================================="
echo "Run tests...." echo "Run tests...."
echo "=========================================" echo "========================================="
cd $src_dir cd $src_dir


for t in *test.sh for t in *test.sh
do do
./t ./$t
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "the test $t failed" echo "the test $t failed"
exit 1 exit 1
fi fi
done done


echo $work_dir
export NIMBUS_HOME=$install_dir
export NIMBUS_TEST_USER=$user_name
#rm -rf $work_dir #rm -rf $work_dir
#mv ~/.ssh/authorized_keys.back ~/.ssh/authorized_keys #mv ~/.ssh/authorized_keys.back ~/.ssh/authorized_keys


Expand Down
13 changes: 12 additions & 1 deletion tests/cc1-test.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash


cd $CLOUD_CLIENT_HOME cd $CLOUD_CLIENT_HOME
./bin/grid-proxy-init.sh
./bin/cloud-client.sh --transfer --sourcefile /etc/group ./bin/cloud-client.sh --transfer --sourcefile /etc/group
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "upload failed" echo "upload failed"
Expand All @@ -11,11 +12,21 @@ if [ $? -ne 0 ]; then
echo "list failed" echo "list failed"
exit 1 exit 1
fi fi
./bin/cloud-client.sh --run --hours .2 --name group handle_line=`./bin/cloud-client.sh --run --hours .2 --name group | tail -n 1`
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "run failed" echo "run failed"
exit 1 exit 1
fi fi


echo $handle_line
handle=`echo $handle_line | sed "s/.*Running: //" | sed "s/'//g"`
echo "++"
echo $handle
./bin/cloud-client.sh --terminate --handle $handle
if [ $? -ne 0 ]; then
echo "terminate failed"
exit 1
fi

exit 0 exit 0


14 changes: 14 additions & 0 deletions tests/install-nim.py
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
import pexpect
import sys

cmd = "%s %s" % (sys.argv[1], sys.argv[2])
logfile = sys.stdout
child = pexpect.spawn (cmd, timeout=800, maxread=200000, logfile=logfile)
child.expect ('CA Name:')
print child.before
child.sendline ('CA')
child.expect ('Hostname:')
print child.before
child.sendline ('localhost')
x = child.readlines()
print x

0 comments on commit 8fe5c30

Please sign in to comment.