OSDN Git Service

trunk整理
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-13-1-13.sh
diff --git a/test/script/l7vsadm/l7vsadm-13-1-13.sh b/test/script/l7vsadm/l7vsadm-13-1-13.sh
new file mode 100755 (executable)
index 0000000..e012fc0
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. ${SET_DEFAULT_CONF}
+
+#Add Service
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+#"-f" and "-t" are used at the same time 
+$L7VSADM -S -f 1 -t 0
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -S -f 1 -t 0"
+        exit 1
+fi
+
+
+RET=`$L7VSADM -V 2>&1 | grep "Agent Status"`
+EXPECT="Agent Status                   active"
+
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V"
+        exit 1
+fi
+
+RET=`$L7VSADM -V 2>&1 | grep "log trap status"`
+EXPECT="log trap status                off"
+
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V"
+        exit 1
+fi
+
+
+
+
+exit 0
+