6 #nc -i 1 -l 9876 > ${TMP_DIR}/nc_tmp &
9 #chkconfig echo-stream on
15 echo "Test failed: $L7VSD"
22 RealServer1=RealServer1
23 RealServer1_ADDR=127.0.0.1
24 RealServer1_PORT=50001
25 start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
28 echo "Test failed: start_lighttpd RealServer1"
32 $L7VSADM -A -t 127.0.0.1:40001 -m ip --statistic 1 -F
35 echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip --statistic 1 -F"
39 $L7VSADM -a -t 127.0.0.1:40001 -m ip -r 127.0.0.1:50001
42 echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m ip -r $RealServer1_ADDR:$RealServer1_PORT"
47 echo -e -n "GET / HTTP/1.0\r\n\r\n" | nc 127.0.0.1 40001
48 echo -e -n "POST / HTTP/1.0\r\n\r\n" | nc 127.0.0.1 40001
50 #HTTP Total Requests check
51 RET=`$L7VSADM -V -n | grep "HTTP Total Requests" | awk '{print $4}'`
53 if [ "${RET}" != "${EXPECT}" ]
55 echo "Test failed: $L7VSADM -V -n"
59 #HTTP GET Requests check
60 RET=`$L7VSADM -V -n | grep "HTTP GET Requests" | awk '{print $4}'`
62 if [ "${RET}" != "${EXPECT}" ]
64 echo "Test failed: $L7VSADM -V -n"
68 #HTTP POST Requests check
69 RET=`$L7VSADM -V -n | grep "HTTP POST Requests" | awk '{print $4}'`
71 if [ "${RET}" != "${EXPECT}" ]
73 echo "Test failed: $L7VSADM -V -n"