OSDN Git Service

7213b7ba5683ecb5b522f741417820c467feb0e4
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / virtualservice / virtualservice-64.sh
1 #!/bin/bash
2
3 . ${SET_DEFAULT_CONF}
4
5 #Add Service
6 $L7VSD
7 if [ $? -ne 0 ]
8 then
9         echo "Test failed: $L7VSD"
10         exit 1
11 fi
12 usleep 100000
13
14 RET=`$L7VSADM -A -t 127.0.0.1:40001 -m sslid -z ${L7VSD_CONF_DIR}/sslproxy/sslproxy.target.cf 2>&1 | grep "PARSE ERROR:"`
15 EXPECT="PARSE ERROR: You cannot set \"-z\" option with \"sslid\" protocol module."
16 if [ "${RET}" != "${EXPECT}" ]
17 then
18         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sslid -z ${L7VSD_CONF_DIR}/sslproxy/sslproxy.target.cf"
19         exit 1
20 fi
21
22 RET=`$L7VSADM`
23 EXPECT="Layer-7 Virtual Server version 3.0.0-1
24 Prot LocalAddress:Port ProtoMod Scheduler
25   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn"
26 if [ "${RET}" != "${EXPECT}" ]
27 then
28         echo "Test failed: $L7VSADM"
29         exit 1
30 fi
31
32 exit 0
33