OSDN Git Service

trunk整理
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-3-9-4.sh
diff --git a/test/script/l7vsadm/l7vsadm-4-3-9-4.sh b/test/script/l7vsadm/l7vsadm-4-3-9-4.sh
new file mode 100755 (executable)
index 0000000..6153b33
--- /dev/null
@@ -0,0 +1,30 @@
+#!/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:40001 -m ip
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip"
+        exit 1
+fi
+
+RET=`$L7VSADM -E -t localhost: -m ip -s wrr 2>&1 | grep "PARSE ERROR: target endpoint parse error(--tcp-service): invalid port number (0):localhost:"`
+EXPECT="PARSE ERROR: target endpoint parse error(--tcp-service): invalid port number (0):localhost:"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -E -t localhost: -m ip -s wrr"
+        exit 1
+fi
+
+exit 0
+