• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂d019b2b1903b4a4e61c55bbb15e7b875730b6b7c (tree)
時間2010-10-14 20:30:51
作者6638678 <6638678@1ed6...>
Commiter6638678

Log Message

add test script

git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10374 1ed66053-1c2d-0410-8867-f7571e6e31d3

Change Summary

差異

--- /dev/null
+++ b/test/script/l7directord/l7directord-4-4-27.sh
@@ -0,0 +1,77 @@
1+#!/bin/bash
2+. ${SET_DEFAULT_CONF}
3+\cp ./materials/l7directord-4-4-27-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
4+
5+#Run http server
6+RealServer1=RealServer1
7+RealServer1_ADDR=127.0.0.1
8+RealServer1_PORT=50001
9+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/l7directord-4-4-27-real1-access.log -S
10+
11+if [ $? -ne 0 ]
12+then
13+ echo "Test failed: start_lighttpd RealServer1"
14+ exit 1
15+fi
16+
17+RealServer2=RealServer2
18+RealServer2_ADDR=127.0.0.1
19+RealServer2_PORT=50002
20+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT -l ${L7VS_LOG_DIR}/l7directord-4-4-27-real2-access.log -S
21+
22+if [ $? -ne 0 ]
23+then
24+ echo "Test failed: start_lighttpd RealServer2"
25+ exit 1
26+fi
27+
28+echo "test" > ${TMP_DIR}/100M.dat
29+set_lighttpd_content $RealServer1 ${TMP_DIR}/100M.dat
30+set_lighttpd_content $RealServer2 ${TMP_DIR}/100M.dat
31+
32+# Start l7vsd
33+$L7VSD
34+if [ $? -ne 0 ]
35+then
36+ echo "Test failed: $L7VSD"
37+ exit 1
38+fi
39+usleep 100000
40+
41+# Start l7directord
42+$INIT_L7DIRECTORD start
43+if [ $? -ne 0 ]
44+then
45+ echo "Test failed: $INIT_L7DIRECTORD start"
46+ exit 1
47+fi
48+sleep 5
49+
50+dd if=/dev/zero of=${TMP_DIR}/100M.dat bs=1024 count=102400
51+set_lighttpd_content $RealServer1 ${TMP_DIR}/100M.dat
52+set_lighttpd_content $RealServer2 ${TMP_DIR}/100M.dat
53+sleep 30
54+
55+$INIT_L7DIRECTORD stop
56+if [ $? -ne 0 ]
57+then
58+ echo "Test failed: $INIT_L7DIRECTORD stop"
59+ exit 1
60+fi
61+
62+RET=`cat ${L7VS_LOG_DIR}/l7directord.log | grep "\[WRN1102\] Service check NG. HTTP response is not ok. Response status line is .500 SSL read timeout: ' (real - .127.0.0.1:50001')"`
63+if [ -z "$RET" ]
64+then
65+ echo "Test failed: ${L7VS_LOG_DIR}/l7directord.log"
66+ exit 1
67+fi
68+
69+RET=`cat ${L7VS_LOG_DIR}/l7directord.log | grep "\[WRN1102\] Service check NG. HTTP response is not ok. Response status line is .500 SSL read timeout: ' (real - .127.0.0.1:50002')"`
70+if [ -z "$RET" ]
71+then
72+ echo "Test failed: ${L7VS_LOG_DIR}/l7directord.log"
73+ exit 1
74+fi
75+
76+exit 0
77+
--- /dev/null
+++ b/test/script/l7directord/materials/l7directord-4-4-27-l7directord.cf
@@ -0,0 +1,8 @@
1+negotiatetimeout=1
2+virtual=127.0.0.1:50000
3+ real=127.0.0.1:50001
4+ real=127.0.0.1:50002
5+ service=https
6+ request=100M.dat
7+ receive="test"
8+