Skip to content

Instantly share code, notes, and snippets.

@aliceh
Last active January 26, 2016 17:44
Show Gist options
  • Save aliceh/ad6de92dea0715c9eb4e to your computer and use it in GitHub Desktop.
Save aliceh/ad6de92dea0715c9eb4e to your computer and use it in GitHub Desktop.
#!/bin/bash
#Fill in the arguments
#run from the guiops/tests directory
#
remote_webdriver_url=""
console_url=""
account=""
user_name=""
password=""
export PYTHONPATH=$PYTHONPATH:guitester
l=${#remote_webdriver_url}
mkdir results
if [ 0 == ${l} ]; then
python tests/keypair.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > results/keypair.log
echo "Keypair test exit status: " $?
if [ $? -eq 0 ]
then
echo "Keypair test: PASS"
else
echo "Keypair test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/security_groups.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > results/security_groups.log
if [ $? -eq 0 ]
then
echo "Security group test: PASS"
else
echo "Security group test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/volumes.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > volumes.log
if [ $? -eq 0 ]
then
echo "Volumes test: PASS"
else
echo "Volumes test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/snapshots.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > snapshots.log
if [ $? -eq 0 ]
then
echo "Snaphots test: PASS"
else
echo "Snapshots test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/buckets.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > buckets.log
if [ $? -eq 0 ]
then
echo "Buckets test: PASS"
else
echo "Buckets test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/autoscaling.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > autoscaling.log
if [ $? -eq 0 ]
then
echo "Autoscaling test: PASS"
else
echo "Autoscaling test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/instances.py -c "$console_url" -a "$account" -u "$user_name" -p "$password" > instances.log
if [ $? -eq 0 ]
then
echo "Instances test: PASS"
else
echo "Instances test: FAIL"
echo "logs are located in the tests/results directory"
fi
else
export DISPLAY=:1
python tests/keypair.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > keypair.log
ls
if [ $? -eq 0 ]
then
echo "Keypair test: PASS"
else
echo "Keypair test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/security_groups.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > security_groups.log
if [ $? -eq 0 ]
then
echo "Security group test: PASS"
else
echo "Security group test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/volumes.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > volumes.log
if [ $? -eq 0 ]
then
echo "Volumes test: PASS"
else
echo "Volumes test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/snapshots.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > snapshots.log
if [ $? -eq 0 ]
then
echo "Snaphots test: PASS"
else
echo "Snapshots test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/buckets.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > buckets.log
if [ $? -eq 0 ]
then
echo "Buckets test: PASS"
else
echo "Buckets test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/autoscaling.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > autoscaling.log
if [ $? -eq 0 ]
then
echo "Autoscaling test: PASS"
else
echo "Autoscaling test: FAIL"
echo "logs are located in the tests/results directory"
fi
python tests/instances.py -w "$remote_webdriver_url" -c "$console_url" -a "$account" -u "$user_name" -p "$password" > instances.log
if [ $? -eq 0 ]
then
echo "Instances test: PASS"
else
echo "Instances test: FAIL"
echo "logs are located in the tests/results directory"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment