OSDN Git Service

bug fix
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-28.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 $L7VSADM -A -t localhost:40001 -m ip --timeout 100
15 if [ $? -ne 0 ]
16 then
17         echo "Test failed: $L7VSADM -A -t localhost:40001 -m ip --timeout 100"
18         exit 1
19 fi
20
21 RET=`$L7VSADM -K`
22 EXPECT="Layer-7 Virtual Server version 3.0.0-1
23 Prot LocalAddress:Port ProtoMod Scheduler
24      SSL_config_file
25      Socket option
26      Access_log_flag
27      Access_log_file
28      Access_log_rotate option
29   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
30 TCP localhost:40001 ip rr
31     none
32     none
33     0
34     none
35     none"
36
37 echo "$RET"
38 if [ "${RET}" != "${EXPECT}" ]
39 then
40         echo "Test failed: $L7VSADM -K"
41         exit 1
42 fi
43
44 exit 0
45