9 echo "Test failed: $L7VSD"
16 RealServer1=RealServer1
17 RealServer1_ADDR=127.0.0.1
18 RealServer1_PORT=50001
19 start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
22 echo "Test failed: start_lighttpd RealServer1"
26 RealServer2=RealServer2
27 RealServer2_ADDR=127.0.0.1
28 RealServer2_PORT=50002
29 start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
32 echo "Test failed: start_lighttpd RealServer2"
36 $L7VSADM -A -t 127.0.0.1:40001 -m sessionless --statistic 1 -F
39 echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless --statistic 1 -F"
43 $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT}
46 echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT}"
50 $L7VSADM -A -t 127.0.0.1:40002 -m sessionless --statistic 1 -F
53 echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless --statistic 1 -F"
57 $L7VSADM -a -t 127.0.0.1:40002 -m sessionless -r ${RealServer2_ADDR}:${RealServer2_PORT}
60 echo "Test failed: $L7VSADM -a -t 127.0.0.1:40002 -m sessionless -r ${RealServer2_ADDR}:${RealServer2_PORT}"
66 GET_REQ="GET / HTTP/1.0\r\n\r\n"
67 POST_REQ="POST / HTTP/1.0\r\n\r\n"
68 for ((I=0; I<100;I++))
70 echo -e -n "${GET_REQ}" | nc 127.0.0.1 40001 >/dev/null 2>&1
71 echo -e -n "${GET_REQ}" | nc 127.0.0.1 40002 >/dev/null 2>&1
74 for ((I=0; I<200;I++))
76 echo -e -n "${POST_REQ}" | nc 127.0.0.1 40001 >/dev/null 2>&1
77 echo -e -n "${POST_REQ}" | nc 127.0.0.1 40002 >/dev/null 2>&1
81 #HTTP Total Requests check
82 RET=`$L7VSADM -V -n | grep "HTTP Total Requests" | awk '{ print $4}'`
85 if [ "${RET}" != "${EXPECT}" ]
87 echo "Test failed: $L7VSADM -V -n | grep "HTTP Total Requests" | awk '{print $4}'"
91 #HTTP GET Requests check
92 RET=`$L7VSADM -V -n | grep "HTTP GET Requests" | awk '{print $4}'`
95 if [ "${RET}" != "${EXPECT}" ]
97 echo "Test failed: $L7VSADM -V -n | grep "HTTP GET Requests" | awk '{print $4}'"
101 #HTTP POST Requests check
102 RET=`$L7VSADM -V -n | grep "HTTP POST Requests" | awk '{print $4}'`
105 if [ "${RET}" != "${EXPECT}" ]
107 echo "Test failed: $L7VSADM -V -n | grep "HTTP POST Requests" | awk '{print $4}"
115 echo "Test failed: $L7VSADM -S -r"
119 #HTTP Total Requests check
120 RET=`$L7VSADM -V -n | grep "HTTP Total Requests" | awk '{print $4}'`
123 if [ "${RET}" != "${EXPECT}" ]
125 echo "Test failed: $L7VSADM -V -n | grep "HTTP Total Requests" | awk '{print $4}'"
129 #HTTP GET Requests check
130 RET=`$L7VSADM -V -n | grep "HTTP GET Requests" | awk '{print $4}'`
134 if [ "${RET}" != "${EXPECT}" ]
136 echo "Test failed: $L7VSADM -V -n | grep "HTTP GET Requests" | awk '{print $4}'"
140 #HTTP POST Requests check
141 RET=`$L7VSADM -V -n | grep "HTTP POST Requests" | awk '{print $4}'`
144 if [ "${RET}" != "${EXPECT}" ]
146 echo "Test failed: $L7VSADM -V -n | grep "HTTP POST Requests" | awk '{print $4}"