Revisão | d949c04c01c9e328361fb4b5a82ff901200547e9 (tree) |
---|---|
Hora | 2010-10-15 18:07:44 |
Autor | 6638678 <6638678@1ed6...> |
Commiter | 6638678 |
add test scripts
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10382 1ed66053-1c2d-0410-8867-f7571e6e31d3
@@ -0,0 +1,140 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
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 | |
10 | +if [ $? -ne 0 ] | |
11 | +then | |
12 | + echo "Test failed: start_lighttpd RealServer1" | |
13 | + exit 1 | |
14 | +fi | |
15 | + | |
16 | +RealServer2=RealServer2 | |
17 | +RealServer2_ADDR=127.0.0.1 | |
18 | +RealServer2_PORT=50002 | |
19 | +start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT | |
20 | +if [ $? -ne 0 ] | |
21 | +then | |
22 | + echo "Test failed: start_lighttpd RealServer2" | |
23 | + exit 1 | |
24 | +fi | |
25 | + | |
26 | +#Add Service | |
27 | +$L7VSD | |
28 | +if [ $? -ne 0 ] | |
29 | +then | |
30 | + echo "Test failed: $L7VSD" | |
31 | + exit 1 | |
32 | +fi | |
33 | +usleep 100000 | |
34 | + | |
35 | +$L7VSADM -A -t localhost6:40001 -m sessionless | |
36 | +if [ $? -ne 0 ] | |
37 | +then | |
38 | + echo "Test failed: $L7VSADM -A -t localhost4:40001 -m sessionless" | |
39 | + exit 1 | |
40 | +fi | |
41 | + | |
42 | +$L7VSADM -a -t localhost6:40001 -m sessionless -r localhost6:${RealServer1_PORT} -w 3 | |
43 | +if [ $? -ne 0 ] | |
44 | +then | |
45 | + echo "Test failed: $L7VSADM -a -t localhost4:40001 -m sessionless -r localhost4:${RealServer1_PORT} -w 3" | |
46 | + exit 1 | |
47 | +fi | |
48 | + | |
49 | +$L7VSADM -a -t localhost6:40001 -m sessionless -r localhost6:${RealServer2_PORT} -w 0 | |
50 | +if [ $? -ne 0 ] | |
51 | +then | |
52 | + echo "Test failed: $L7VSADM -a -t localhost4:40001 -m sessionless -r localhost4:${RealServer2_PORT} -w 0" | |
53 | + exit 1 | |
54 | +fi | |
55 | + | |
56 | + | |
57 | +RET=`$L7VSADM -V` | |
58 | + | |
59 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
60 | +L7vsd Log Level: | |
61 | +Category Level | |
62 | +l7vsd_network warn | |
63 | +l7vsd_network_qos warn | |
64 | +l7vsd_network_bandwidth warn | |
65 | +l7vsd_network_num_connection warn | |
66 | +l7vsd_network_access warn | |
67 | +l7vsd_mainthread warn | |
68 | +l7vsd_virtualservice warn | |
69 | +l7vsd_virtualservice_thread warn | |
70 | +l7vsd_session warn | |
71 | +l7vsd_session_thread warn | |
72 | +l7vsd_realserver warn | |
73 | +l7vsd_sorryserver warn | |
74 | +l7vsd_module warn | |
75 | +l7vsd_replication warn | |
76 | +l7vsd_replication_sendthread warn | |
77 | +l7vsd_parameter warn | |
78 | +l7vsd_logger warn | |
79 | +l7vsd_command warn | |
80 | +l7vsd_start_stop warn | |
81 | +l7vsd_system warn | |
82 | +l7vsd_system_memory warn | |
83 | +l7vsd_system_endpoint warn | |
84 | +l7vsd_system_signal warn | |
85 | +l7vsd_system_environment warn | |
86 | +l7vsd_snmpagent info | |
87 | +l7vsd_protocol warn | |
88 | +l7vsd_schedule warn | |
89 | + | |
90 | +Replication Mode: | |
91 | +SINGLE | |
92 | + | |
93 | +SNMPAgent: | |
94 | +Agent Status inactive | |
95 | +log trap status none | |
96 | +log trap level none | |
97 | +cache update interval none | |
98 | +start date none | |
99 | +last request date none | |
100 | +last trap date none | |
101 | +total GET requests none | |
102 | +total SET requests none | |
103 | +total trap counts none | |
104 | + | |
105 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
106 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn | |
107 | +TCP localhost:40001 sessionless rr --sorry-uri '/' --statistic 0 | |
108 | + -> localhost:50001 Masq 3 0 0 | |
109 | + -> localhost:50002 Masq 0 0 0 | |
110 | + Bypass Settings: | |
111 | + Sorry Server none | |
112 | + Max Connection 0 | |
113 | + Sorry Flag off | |
114 | + SSL Settings: | |
115 | + SSL Config File none | |
116 | + Logging Settings: | |
117 | + Access Log off | |
118 | + Access Log File none | |
119 | + Access Log Rotate --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M | |
120 | + Socket Settings: | |
121 | + TCP_DEFER_ACCEPT disable | |
122 | + TCP_NODELAY disable | |
123 | + TCP_CORK disable | |
124 | + TCP_QUICKACK auto | |
125 | + Throughput: | |
126 | + Current Upload / Limit 0.000000 Mbps / 0.000000 Mbps | |
127 | + Current Download / Limit 0.000000 Mbps / 0.000000 Mbps | |
128 | + Statistics: | |
129 | + HTTP Total Requests 0 | |
130 | + HTTP GET Requests 0 | |
131 | + HTTP POST Requests 0" | |
132 | + | |
133 | +if [ "${RET}" != "${EXPECT}" ] | |
134 | +then | |
135 | + echo "Test failed: $L7VSADM -V" | |
136 | + exit 1 | |
137 | +fi | |
138 | + | |
139 | +exit 0 | |
140 | + |
@@ -0,0 +1,138 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
4 | + | |
5 | +#Run http server | |
6 | +RealServer1=RealServer1 | |
7 | +RealServer1_ADDR=[::1] | |
8 | +RealServer1_PORT=50001 | |
9 | +start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT | |
10 | +if [ $? -ne 0 ] | |
11 | +then | |
12 | + echo "Test failed: start_lighttpd RealServer1" | |
13 | + exit 1 | |
14 | +fi | |
15 | + | |
16 | +RealServer2=RealServer2 | |
17 | +RealServer2_ADDR=[::1] | |
18 | +RealServer2_PORT=50002 | |
19 | +start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT | |
20 | +if [ $? -ne 0 ] | |
21 | +then | |
22 | + echo "Test failed: start_lighttpd RealServer2" | |
23 | + exit 1 | |
24 | +fi | |
25 | + | |
26 | +#Add Service | |
27 | +$L7VSD | |
28 | +if [ $? -ne 0 ] | |
29 | +then | |
30 | + echo "Test failed: $L7VSD" | |
31 | + exit 1 | |
32 | +fi | |
33 | +usleep 100000 | |
34 | + | |
35 | +$L7VSADM -A -t localhost6:40001 -m sessionless | |
36 | +if [ $? -ne 0 ] | |
37 | +then | |
38 | + echo "Test failed: $L7VSADM -A -t localhost4:40001 -m sessionless" | |
39 | + exit 1 | |
40 | +fi | |
41 | + | |
42 | +$L7VSADM -a -t localhost6:40001 -m sessionless -r localhost4:${RealServer1_PORT} -w 3 | |
43 | +if [ $? -ne 0 ] | |
44 | +then | |
45 | + echo "Test failed: $L7VSADM -a -t localhost4:40001 -m sessionless -r localhost4:${RealServer1_PORT} -w 3" | |
46 | + exit 1 | |
47 | +fi | |
48 | + | |
49 | +$L7VSADM -a -t localhost6:40001 -m sessionless -r localhost4:${RealServer2_PORT} -w 0 | |
50 | +if [ $? -ne 0 ] | |
51 | +then | |
52 | + echo "Test failed: $L7VSADM -a -t localhost4:40001 -m sessionless -r localhost4:${RealServer2_PORT} -w 0" | |
53 | + exit 1 | |
54 | +fi | |
55 | + | |
56 | + | |
57 | +RET=`$L7VSADM -V` | |
58 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
59 | +L7vsd Log Level: | |
60 | +Category Level | |
61 | +l7vsd_network warn | |
62 | +l7vsd_network_qos warn | |
63 | +l7vsd_network_bandwidth warn | |
64 | +l7vsd_network_num_connection warn | |
65 | +l7vsd_network_access warn | |
66 | +l7vsd_mainthread warn | |
67 | +l7vsd_virtualservice warn | |
68 | +l7vsd_virtualservice_thread warn | |
69 | +l7vsd_session warn | |
70 | +l7vsd_session_thread warn | |
71 | +l7vsd_realserver warn | |
72 | +l7vsd_sorryserver warn | |
73 | +l7vsd_module warn | |
74 | +l7vsd_replication warn | |
75 | +l7vsd_replication_sendthread warn | |
76 | +l7vsd_parameter warn | |
77 | +l7vsd_logger warn | |
78 | +l7vsd_command warn | |
79 | +l7vsd_start_stop warn | |
80 | +l7vsd_system warn | |
81 | +l7vsd_system_memory warn | |
82 | +l7vsd_system_endpoint warn | |
83 | +l7vsd_system_signal warn | |
84 | +l7vsd_system_environment warn | |
85 | +l7vsd_snmpagent info | |
86 | +l7vsd_protocol warn | |
87 | +l7vsd_schedule warn | |
88 | + | |
89 | +Replication Mode: | |
90 | +SINGLE | |
91 | + | |
92 | +SNMPAgent: | |
93 | +Agent Status inactive | |
94 | +log trap status none | |
95 | +log trap level none | |
96 | +cache update interval none | |
97 | +start date none | |
98 | +last request date none | |
99 | +last trap date none | |
100 | +total GET requests none | |
101 | +total SET requests none | |
102 | +total trap counts none | |
103 | + | |
104 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
105 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn | |
106 | +TCP localhost:40001 sessionless rr --sorry-uri '/' --statistic 0 | |
107 | + -> localhost:50001 Masq 3 0 0 | |
108 | + -> localhost:50002 Masq 0 0 0 | |
109 | + Bypass Settings: | |
110 | + Sorry Server none | |
111 | + Max Connection 0 | |
112 | + Sorry Flag off | |
113 | + SSL Settings: | |
114 | + SSL Config File none | |
115 | + Logging Settings: | |
116 | + Access Log off | |
117 | + Access Log File none | |
118 | + Access Log Rotate --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M | |
119 | + Socket Settings: | |
120 | + TCP_DEFER_ACCEPT disable | |
121 | + TCP_NODELAY disable | |
122 | + TCP_CORK disable | |
123 | + TCP_QUICKACK auto | |
124 | + Throughput: | |
125 | + Current Upload / Limit 0.000000 Mbps / 0.000000 Mbps | |
126 | + Current Download / Limit 0.000000 Mbps / 0.000000 Mbps | |
127 | + Statistics: | |
128 | + HTTP Total Requests 0 | |
129 | + HTTP GET Requests 0 | |
130 | + HTTP POST Requests 0" | |
131 | +if [ "${RET}" != "${EXPECT}" ] | |
132 | +then | |
133 | + echo "Test failed: $L7VSADM -V" | |
134 | + exit 1 | |
135 | +fi | |
136 | + | |
137 | +exit 0 | |
138 | + |
@@ -0,0 +1,102 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
4 | + | |
5 | +#Add Service | |
6 | +$L7VSD | |
7 | +if [ $? -ne 0 ] | |
8 | +then | |
9 | + echo "Test failed: $L7VSD" | |
10 | + exit 1 | |
11 | +fi | |
12 | +usleep 100000 | |
13 | + | |
14 | +$L7VSADM -A -t localhost4:40001 -m sessionless | |
15 | +if [ $? -ne 0 ] | |
16 | +then | |
17 | + echo "Test failed: $L7VSADM -A -t localhost4:40001 -m sessionless" | |
18 | + exit 1 | |
19 | +fi | |
20 | + | |
21 | + | |
22 | +RET=`$L7VSADM -V -n` | |
23 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
24 | +L7vsd Log Level: | |
25 | +Category Level | |
26 | +l7vsd_network warn | |
27 | +l7vsd_network_qos warn | |
28 | +l7vsd_network_bandwidth warn | |
29 | +l7vsd_network_num_connection warn | |
30 | +l7vsd_network_access warn | |
31 | +l7vsd_mainthread warn | |
32 | +l7vsd_virtualservice warn | |
33 | +l7vsd_virtualservice_thread warn | |
34 | +l7vsd_session warn | |
35 | +l7vsd_session_thread warn | |
36 | +l7vsd_realserver warn | |
37 | +l7vsd_sorryserver warn | |
38 | +l7vsd_module warn | |
39 | +l7vsd_replication warn | |
40 | +l7vsd_replication_sendthread warn | |
41 | +l7vsd_parameter warn | |
42 | +l7vsd_logger warn | |
43 | +l7vsd_command warn | |
44 | +l7vsd_start_stop warn | |
45 | +l7vsd_system warn | |
46 | +l7vsd_system_memory warn | |
47 | +l7vsd_system_endpoint warn | |
48 | +l7vsd_system_signal warn | |
49 | +l7vsd_system_environment warn | |
50 | +l7vsd_snmpagent info | |
51 | +l7vsd_protocol warn | |
52 | +l7vsd_schedule warn | |
53 | + | |
54 | +Replication Mode: | |
55 | +SINGLE | |
56 | + | |
57 | +SNMPAgent: | |
58 | +Agent Status inactive | |
59 | +log trap status none | |
60 | +log trap level none | |
61 | +cache update interval none | |
62 | +start date none | |
63 | +last request date none | |
64 | +last trap date none | |
65 | +total GET requests none | |
66 | +total SET requests none | |
67 | +total trap counts none | |
68 | + | |
69 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
70 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn | |
71 | +TCP 127.0.0.1:40001 sessionless rr --sorry-uri '/' --statistic 0 | |
72 | + Bypass Settings: | |
73 | + Sorry Server none | |
74 | + Max Connection 0 | |
75 | + Sorry Flag off | |
76 | + SSL Settings: | |
77 | + SSL Config File none | |
78 | + Logging Settings: | |
79 | + Access Log off | |
80 | + Access Log File none | |
81 | + Access Log Rotate --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M | |
82 | + Socket Settings: | |
83 | + TCP_DEFER_ACCEPT disable | |
84 | + TCP_NODELAY disable | |
85 | + TCP_CORK disable | |
86 | + TCP_QUICKACK auto | |
87 | + Throughput: | |
88 | + Current Upload / Limit 0.000000 Mbps / 0.000000 Mbps | |
89 | + Current Download / Limit 0.000000 Mbps / 0.000000 Mbps | |
90 | + Statistics: | |
91 | + HTTP Total Requests 0 | |
92 | + HTTP GET Requests 0 | |
93 | + HTTP POST Requests 0" | |
94 | + | |
95 | +if [ "${RET}" != "${EXPECT}" ] | |
96 | +then | |
97 | + echo "Test failed: $L7VSADM -V -n" | |
98 | + exit 1 | |
99 | +fi | |
100 | + | |
101 | +exit 0 | |
102 | + |
@@ -0,0 +1,102 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
4 | + | |
5 | +#Add Service | |
6 | +$L7VSD | |
7 | +if [ $? -ne 0 ] | |
8 | +then | |
9 | + echo "Test failed: $L7VSD" | |
10 | + exit 1 | |
11 | +fi | |
12 | +usleep 100000 | |
13 | + | |
14 | +$L7VSADM -A -t localhost6:40001 -m sessionless | |
15 | +if [ $? -ne 0 ] | |
16 | +then | |
17 | + echo "Test failed: $L7VSADM -A -t localhost6:40001 -m sessionless" | |
18 | + exit 1 | |
19 | +fi | |
20 | + | |
21 | + | |
22 | +RET=`$L7VSADM -V -n` | |
23 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
24 | +L7vsd Log Level: | |
25 | +Category Level | |
26 | +l7vsd_network warn | |
27 | +l7vsd_network_qos warn | |
28 | +l7vsd_network_bandwidth warn | |
29 | +l7vsd_network_num_connection warn | |
30 | +l7vsd_network_access warn | |
31 | +l7vsd_mainthread warn | |
32 | +l7vsd_virtualservice warn | |
33 | +l7vsd_virtualservice_thread warn | |
34 | +l7vsd_session warn | |
35 | +l7vsd_session_thread warn | |
36 | +l7vsd_realserver warn | |
37 | +l7vsd_sorryserver warn | |
38 | +l7vsd_module warn | |
39 | +l7vsd_replication warn | |
40 | +l7vsd_replication_sendthread warn | |
41 | +l7vsd_parameter warn | |
42 | +l7vsd_logger warn | |
43 | +l7vsd_command warn | |
44 | +l7vsd_start_stop warn | |
45 | +l7vsd_system warn | |
46 | +l7vsd_system_memory warn | |
47 | +l7vsd_system_endpoint warn | |
48 | +l7vsd_system_signal warn | |
49 | +l7vsd_system_environment warn | |
50 | +l7vsd_snmpagent info | |
51 | +l7vsd_protocol warn | |
52 | +l7vsd_schedule warn | |
53 | + | |
54 | +Replication Mode: | |
55 | +SINGLE | |
56 | + | |
57 | +SNMPAgent: | |
58 | +Agent Status inactive | |
59 | +log trap status none | |
60 | +log trap level none | |
61 | +cache update interval none | |
62 | +start date none | |
63 | +last request date none | |
64 | +last trap date none | |
65 | +total GET requests none | |
66 | +total SET requests none | |
67 | +total trap counts none | |
68 | + | |
69 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
70 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn | |
71 | +TCP [::1]:40001 sessionless rr --sorry-uri '/' --statistic 0 | |
72 | + Bypass Settings: | |
73 | + Sorry Server none | |
74 | + Max Connection 0 | |
75 | + Sorry Flag off | |
76 | + SSL Settings: | |
77 | + SSL Config File none | |
78 | + Logging Settings: | |
79 | + Access Log off | |
80 | + Access Log File none | |
81 | + Access Log Rotate --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M | |
82 | + Socket Settings: | |
83 | + TCP_DEFER_ACCEPT disable | |
84 | + TCP_NODELAY disable | |
85 | + TCP_CORK disable | |
86 | + TCP_QUICKACK auto | |
87 | + Throughput: | |
88 | + Current Upload / Limit 0.000000 Mbps / 0.000000 Mbps | |
89 | + Current Download / Limit 0.000000 Mbps / 0.000000 Mbps | |
90 | + Statistics: | |
91 | + HTTP Total Requests 0 | |
92 | + HTTP GET Requests 0 | |
93 | + HTTP POST Requests 0" | |
94 | + | |
95 | +if [ "${RET}" != "${EXPECT}" ] | |
96 | +then | |
97 | + echo "Test failed: $L7VSADM -V -n" | |
98 | + exit 1 | |
99 | +fi | |
100 | + | |
101 | +exit 0 | |
102 | + |
@@ -0,0 +1,71 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
4 | + | |
5 | +#Add Service | |
6 | +$L7VSD | |
7 | +if [ $? -ne 0 ] | |
8 | +then | |
9 | + echo "Test failed: $L7VSD" | |
10 | + exit 1 | |
11 | +fi | |
12 | +usleep 100000 | |
13 | + | |
14 | +RET=`$L7VSADM -V` | |
15 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
16 | +L7vsd Log Level: | |
17 | +Category Level | |
18 | +l7vsd_network warn | |
19 | +l7vsd_network_qos warn | |
20 | +l7vsd_network_bandwidth warn | |
21 | +l7vsd_network_num_connection warn | |
22 | +l7vsd_network_access warn | |
23 | +l7vsd_mainthread warn | |
24 | +l7vsd_virtualservice warn | |
25 | +l7vsd_virtualservice_thread warn | |
26 | +l7vsd_session warn | |
27 | +l7vsd_session_thread warn | |
28 | +l7vsd_realserver warn | |
29 | +l7vsd_sorryserver warn | |
30 | +l7vsd_module warn | |
31 | +l7vsd_replication warn | |
32 | +l7vsd_replication_sendthread warn | |
33 | +l7vsd_parameter warn | |
34 | +l7vsd_logger warn | |
35 | +l7vsd_command warn | |
36 | +l7vsd_start_stop warn | |
37 | +l7vsd_system warn | |
38 | +l7vsd_system_memory warn | |
39 | +l7vsd_system_endpoint warn | |
40 | +l7vsd_system_signal warn | |
41 | +l7vsd_system_environment warn | |
42 | +l7vsd_snmpagent info | |
43 | +l7vsd_protocol warn | |
44 | +l7vsd_schedule warn | |
45 | + | |
46 | +Replication Mode: | |
47 | +SINGLE | |
48 | + | |
49 | +SNMPAgent: | |
50 | +Agent Status inactive | |
51 | +log trap status none | |
52 | +log trap level none | |
53 | +cache update interval none | |
54 | +start date none | |
55 | +last request date none | |
56 | +last trap date none | |
57 | +total GET requests none | |
58 | +total SET requests none | |
59 | +total trap counts none | |
60 | + | |
61 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
62 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn" | |
63 | + | |
64 | +if [ "${RET}" != "${EXPECT}" ] | |
65 | +then | |
66 | + echo "Test failed: $L7VSADM -V" | |
67 | + exit 1 | |
68 | +fi | |
69 | + | |
70 | +exit 0 | |
71 | + |
@@ -0,0 +1,102 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
4 | + | |
5 | +#Add Service | |
6 | +$L7VSD | |
7 | +if [ $? -ne 0 ] | |
8 | +then | |
9 | + echo "Test failed: $L7VSD" | |
10 | + exit 1 | |
11 | +fi | |
12 | +usleep 100000 | |
13 | + | |
14 | +$L7VSADM -A -t 127.0.0.1:40001 -m sessionless | |
15 | +if [ $? -ne 0 ] | |
16 | +then | |
17 | + echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless" | |
18 | + exit 1 | |
19 | +fi | |
20 | + | |
21 | + | |
22 | +RET=`$L7VSADM -V -n` | |
23 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
24 | +L7vsd Log Level: | |
25 | +Category Level | |
26 | +l7vsd_network warn | |
27 | +l7vsd_network_qos warn | |
28 | +l7vsd_network_bandwidth warn | |
29 | +l7vsd_network_num_connection warn | |
30 | +l7vsd_network_access warn | |
31 | +l7vsd_mainthread warn | |
32 | +l7vsd_virtualservice warn | |
33 | +l7vsd_virtualservice_thread warn | |
34 | +l7vsd_session warn | |
35 | +l7vsd_session_thread warn | |
36 | +l7vsd_realserver warn | |
37 | +l7vsd_sorryserver warn | |
38 | +l7vsd_module warn | |
39 | +l7vsd_replication warn | |
40 | +l7vsd_replication_sendthread warn | |
41 | +l7vsd_parameter warn | |
42 | +l7vsd_logger warn | |
43 | +l7vsd_command warn | |
44 | +l7vsd_start_stop warn | |
45 | +l7vsd_system warn | |
46 | +l7vsd_system_memory warn | |
47 | +l7vsd_system_endpoint warn | |
48 | +l7vsd_system_signal warn | |
49 | +l7vsd_system_environment warn | |
50 | +l7vsd_snmpagent info | |
51 | +l7vsd_protocol warn | |
52 | +l7vsd_schedule warn | |
53 | + | |
54 | +Replication Mode: | |
55 | +SINGLE | |
56 | + | |
57 | +SNMPAgent: | |
58 | +Agent Status inactive | |
59 | +log trap status none | |
60 | +log trap level none | |
61 | +cache update interval none | |
62 | +start date none | |
63 | +last request date none | |
64 | +last trap date none | |
65 | +total GET requests none | |
66 | +total SET requests none | |
67 | +total trap counts none | |
68 | + | |
69 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
70 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn | |
71 | +TCP 127.0.0.1:40001 sessionless rr --sorry-uri '/' --statistic 0 | |
72 | + Bypass Settings: | |
73 | + Sorry Server none | |
74 | + Max Connection 0 | |
75 | + Sorry Flag off | |
76 | + SSL Settings: | |
77 | + SSL Config File none | |
78 | + Logging Settings: | |
79 | + Access Log off | |
80 | + Access Log File none | |
81 | + Access Log Rotate --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M | |
82 | + Socket Settings: | |
83 | + TCP_DEFER_ACCEPT disable | |
84 | + TCP_NODELAY disable | |
85 | + TCP_CORK disable | |
86 | + TCP_QUICKACK auto | |
87 | + Throughput: | |
88 | + Current Upload / Limit 0.000000 Mbps / 0.000000 Mbps | |
89 | + Current Download / Limit 0.000000 Mbps / 0.000000 Mbps | |
90 | + Statistics: | |
91 | + HTTP Total Requests 0 | |
92 | + HTTP GET Requests 0 | |
93 | + HTTP POST Requests 0" | |
94 | + | |
95 | +if [ "${RET}" != "${EXPECT}" ] | |
96 | +then | |
97 | + echo "Test failed: $L7VSADM -V -n" | |
98 | + exit 1 | |
99 | +fi | |
100 | + | |
101 | +exit 0 | |
102 | + |
@@ -0,0 +1,102 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +. ${SET_DEFAULT_CONF} | |
4 | + | |
5 | +#Add Service | |
6 | +$L7VSD | |
7 | +if [ $? -ne 0 ] | |
8 | +then | |
9 | + echo "Test failed: $L7VSD" | |
10 | + exit 1 | |
11 | +fi | |
12 | +usleep 100000 | |
13 | + | |
14 | +$L7VSADM -A -t [::1]:40001 -m sessionless | |
15 | +if [ $? -ne 0 ] | |
16 | +then | |
17 | + echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless" | |
18 | + exit 1 | |
19 | +fi | |
20 | + | |
21 | + | |
22 | +RET=`$L7VSADM -V -n` | |
23 | +EXPECT="Layer-7 Virtual Server version 3.0.0 | |
24 | +L7vsd Log Level: | |
25 | +Category Level | |
26 | +l7vsd_network warn | |
27 | +l7vsd_network_qos warn | |
28 | +l7vsd_network_bandwidth warn | |
29 | +l7vsd_network_num_connection warn | |
30 | +l7vsd_network_access warn | |
31 | +l7vsd_mainthread warn | |
32 | +l7vsd_virtualservice warn | |
33 | +l7vsd_virtualservice_thread warn | |
34 | +l7vsd_session warn | |
35 | +l7vsd_session_thread warn | |
36 | +l7vsd_realserver warn | |
37 | +l7vsd_sorryserver warn | |
38 | +l7vsd_module warn | |
39 | +l7vsd_replication warn | |
40 | +l7vsd_replication_sendthread warn | |
41 | +l7vsd_parameter warn | |
42 | +l7vsd_logger warn | |
43 | +l7vsd_command warn | |
44 | +l7vsd_start_stop warn | |
45 | +l7vsd_system warn | |
46 | +l7vsd_system_memory warn | |
47 | +l7vsd_system_endpoint warn | |
48 | +l7vsd_system_signal warn | |
49 | +l7vsd_system_environment warn | |
50 | +l7vsd_snmpagent info | |
51 | +l7vsd_protocol warn | |
52 | +l7vsd_schedule warn | |
53 | + | |
54 | +Replication Mode: | |
55 | +SINGLE | |
56 | + | |
57 | +SNMPAgent: | |
58 | +Agent Status inactive | |
59 | +log trap status none | |
60 | +log trap level none | |
61 | +cache update interval none | |
62 | +start date none | |
63 | +last request date none | |
64 | +last trap date none | |
65 | +total GET requests none | |
66 | +total SET requests none | |
67 | +total trap counts none | |
68 | + | |
69 | +Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string | |
70 | + -> RemoteAddress:Port Forward Weight ActiveConn InactConn | |
71 | +TCP [::1]:40001 sessionless rr --sorry-uri '/' --statistic 0 | |
72 | + Bypass Settings: | |
73 | + Sorry Server none | |
74 | + Max Connection 0 | |
75 | + Sorry Flag off | |
76 | + SSL Settings: | |
77 | + SSL Config File none | |
78 | + Logging Settings: | |
79 | + Access Log off | |
80 | + Access Log File none | |
81 | + Access Log Rotate --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M | |
82 | + Socket Settings: | |
83 | + TCP_DEFER_ACCEPT disable | |
84 | + TCP_NODELAY disable | |
85 | + TCP_CORK disable | |
86 | + TCP_QUICKACK auto | |
87 | + Throughput: | |
88 | + Current Upload / Limit 0.000000 Mbps / 0.000000 Mbps | |
89 | + Current Download / Limit 0.000000 Mbps / 0.000000 Mbps | |
90 | + Statistics: | |
91 | + HTTP Total Requests 0 | |
92 | + HTTP GET Requests 0 | |
93 | + HTTP POST Requests 0" | |
94 | + | |
95 | +if [ "${RET}" != "${EXPECT}" ] | |
96 | +then | |
97 | + echo "Test failed: $L7VSADM -V -n" | |
98 | + exit 1 | |
99 | +fi | |
100 | + | |
101 | +exit 0 | |
102 | + |