OSDN Git Service

trunk整理
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / PT / B / B-8-IPv6v6.sh
diff --git a/test/script/PT/B/B-8-IPv6v6.sh b/test/script/PT/B/B-8-IPv6v6.sh
new file mode 100755 (executable)
index 0000000..dccfc04
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+. ${SET_DEFAULT_CONF}
+
+VS="[::1]"
+SS="[::1]"
+
+#Run http server
+SorryServer1=SorryServer1
+SorryServer1_ADDR=$SS
+SorryServer1_PORT=50001
+start_lighttpd -s $SorryServer1 -a $SorryServer1_ADDR -p $SorryServer1_PORT -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer1"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+$L7VSADM -A -t $VS:40001 -m sessionless -s rr -u 100 -b $SS:50001 -f 0 -Q 200K -q 200k
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t $VS:40001 -m sessionless -s rr -u 100 -b $SS:50001 -f 0 -Q 200K -q 200k"
+        exit 1
+fi
+
+RET=`$L7VSADM -l`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:40001 sessionless rr"
+
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -l"
+        exit 1
+fi
+
+$L7VSADM -C
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -C"
+        exit 1
+fi
+
+RET=`$L7VSADM -l`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -l"
+        exit 1
+fi
+
+exit 0
+
+