summaryrefslogtreecommitdiffstats
path: root/samples/scenarios/clearwater_ims/scripts/run-live-test.sh
blob: 6fb0a50e2ab5a70a6efeee550f7b953672f94ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

TITLE="System Information for $HOSTNAME"
RIGHT_NOW=$(date +"%x %r %Z")
TIME_STAMP="Updated on $RIGHT_NOW by $USER"

BONO_SIP_PROXY_IP=$1
ELLIS_IP=$2
BASIC=$3

para1=0
para2=0
if [[ -n "$BONO_SIP_PROXY_IP" ]];then 
   para1=1
else
   echo "ERROR: Missing External Loadbalancer IP for Bono"
fi
if [[ -n "$ELLIS_IP" ]];then
   para2=1
else
   echo "ERROR: Missing External Loadbalancer IP for Ellis"
fi

if [ "$para1" -eq "0" ];then
   echo "";echo "USAGE: $0 <BONO_SIP_PROXY_IP> <ELLIS_IP>";echo ""
   exit
fi
if [ "$para2" -eq "0" ];then
   echo "";echo "USAGE: $0 <BONO_SIP_PROXY_IP> <ELLIS_IP>";echo ""
   exit
fi


if [[ $para1 == 1 && $para2 == 1 ]];then 
   if [ "$BASIC" == "basic" ];then
      docker exec -it live-test bash -c "source /etc/profile.d/rvm.sh && cd /opt/clearwater-live-test && rake test[default.svc.cluster.local] PROXY=$BONO_SIP_PROXY_IP ELLIS=$ELLIS_IP SIGNUP_CODE=\"secret\" TESTS=\"Basic Call - Mainline\""
   else
      docker exec -it live-test bash -c "source /etc/profile.d/rvm.sh && cd /opt/clearwater-live-test && rake test[default.svc.cluster.local] PROXY=$BONO_SIP_PROXY_IP ELLIS=$ELLIS_IP SIGNUP_CODE=\"secret\""
   fi
fi