OSDN Git Service

trunk整理
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / module-protocol-ip / ip-8.sh
diff --git a/test/script/module-protocol-ip/ip-8.sh b/test/script/module-protocol-ip/ip-8.sh
new file mode 100755 (executable)
index 0000000..fddd08e
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+. ${SET_DEFAULT_CONF}
+
+#Add Service
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+
+usleep 100000
+$L7VSADM -A -t 127.0.0.1:44431 -m ip --no-reschedule
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:44431 -m ip --no-reschedule"
+        exit 1
+fi
+
+$L7VSADM -A -t 127.0.0.1:44432 -m ip -N
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:44432 -m ip -N"
+        exit 1
+fi
+
+#Check default value
+RET=`$L7VSADM -V -n | grep "127.0.0.1:44431" | awk '{print $5,$6,$7,$8,$9}'`
+EXPECT="--timeout 3600 --no-reschedule --sorry-uri '/'"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V -n"
+        exit 1
+fi
+
+RET=`$L7VSADM -V -n | grep "127.0.0.1:44432" | awk '{print $5,$6,$7,$8,$9}'`
+EXPECT="--timeout 3600 --no-reschedule --sorry-uri '/'"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V -n"
+        exit 1
+fi
+
+exit 0
+