OSDN Git Service

Change version number
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-3-39.sh
1 #!/bin/bash
2 . ${SET_DEFAULT_CONF}
3
4 #Run http server
5 SorryServer1=SorryServer1
6 SorryServer1_ADDR=127.0.0.1
7 SorryServer1_PORT=50001
8 start_lighttpd -s $SorryServer1 -a $SorryServer1_ADDR -p $SorryServer1_PORT
9 if [ $? -ne 0 ]
10 then
11         echo "Test failed: start_lighttpd SorryServer1"
12         exit 1
13 fi
14
15 SorryServer2=SorryServer2
16 SorryServer2_ADDR=[::1]
17 SorryServer2_PORT=50002
18 start_lighttpd -s $SorryServer2 -a $SorryServer2_ADDR -p $SorryServer2_PORT -i
19 if [ $? -ne 0 ]
20 then
21         echo "Test failed: start_lighttpd SorryServer2"
22         exit 1
23 fi
24
25 #Add Service
26 $L7VSD
27 if [ $? -ne 0 ]
28 then
29         echo "Test failed: $L7VSD"
30         exit 1
31 fi
32 usleep 100000
33
34 $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -M
35 if [ $? -ne 0 ]
36 then
37         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -M"
38         exit 1
39 fi
40
41 $L7VSADM -A -t 127.0.0.1:40002 -m sessionless -b ${SorryServer2_ADDR}:${SorryServer2_PORT} -M
42 if [ $? -ne 0 ]
43 then
44         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40002 -m sessionless -b ${SorryServer2_ADDR}:${SorryServer2_PORT} -M"
45         exit 1
46 fi
47
48 $L7VSADM -A -t 127.0.0.1:40003 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -T
49 if [ $? -ne 0 ]
50 then
51         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40003 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -T"
52         exit 1
53 fi
54
55 $L7VSADM -A -t 127.0.0.1:40004 -m sessionless -b ${SorryServer2_ADDR}:${SorryServer2_PORT} -T
56 if [ $? -ne 0 ]
57 then
58         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer2_ADDR}:${SorryServer2_PORT} -T"
59         exit 1
60 fi
61
62 RET=`$L7VSADM -V -n`
63 EXPECT="Layer-7 Virtual Server version 3.0.0
64 L7vsd Log Level:
65 Category                       Level
66 l7vsd_network                  warn
67 l7vsd_network_qos              warn
68 l7vsd_network_bandwidth        warn
69 l7vsd_network_num_connection   warn
70 l7vsd_network_access           warn
71 l7vsd_mainthread               warn
72 l7vsd_virtualservice           warn
73 l7vsd_virtualservice_thread    warn
74 l7vsd_session                  warn
75 l7vsd_session_thread           warn
76 l7vsd_realserver               warn
77 l7vsd_sorryserver              warn
78 l7vsd_module                   warn
79 l7vsd_replication              warn
80 l7vsd_replication_sendthread   warn
81 l7vsd_parameter                warn
82 l7vsd_logger                   warn
83 l7vsd_command                  warn
84 l7vsd_start_stop               warn
85 l7vsd_system                   warn
86 l7vsd_system_memory            warn
87 l7vsd_system_endpoint          warn
88 l7vsd_system_signal            warn
89 l7vsd_system_environment       warn
90 l7vsd_snmpbridge               warn
91 l7vsd_protocol                 warn
92 l7vsd_schedule                 warn
93
94 Replication Mode:
95 SINGLE
96
97 SNMPAgent Connection Status:
98 non-connecting
99
100 SNMPAgent Log Level:
101 Category                       Level
102 snmpagent_start_stop           warn
103 snmpagent_manager_receive      warn
104 snmpagent_manager_send         warn
105 snmpagent_l7vsd_receive        warn
106 snmpagent_l7vsd_send           warn
107 snmpagent_logger               warn
108 snmpagent_parameter            warn
109 snmpagent_system               warn
110 snmpagent_system_memory        warn
111 snmpagent_system_endpoint      warn
112 snmpagent_system_signal        warn
113 snmpagent_system_environment   warn
114
115 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
116      SorryAddress:Port Sorry_cc Sorry_flag
117      QoS-up   Throughput-up
118      QoS-down Throughput-down
119      SSL_config_file
120      Socket option
121      Access_log_flag
122      Access_log_file
123      Access_log_rotate option
124   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
125 TCP 127.0.0.1:40001 sessionless rr --sorry-uri '/'
126     ${SorryServer1_ADDR}:${SorryServer1_PORT}(Masq) 0 0
127     0 0
128     0 0
129     none
130     none
131     0
132     none
133     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
134 TCP 127.0.0.1:40002 sessionless rr --sorry-uri '/'
135     ${SorryServer2_ADDR}:${SorryServer2_PORT}(Masq) 0 0
136     0 0
137     0 0
138     none
139     none
140     0
141     none
142     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
143 TCP 127.0.0.1:40003 sessionless rr --sorry-uri '/'
144     ${SorryServer1_ADDR}:${SorryServer1_PORT}(Tproxy) 0 0
145     0 0
146     0 0
147     none
148     none
149     0
150     none
151     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
152 TCP 127.0.0.1:40004 sessionless rr --sorry-uri '/'
153     ${SorryServer2_ADDR}:${SorryServer2_PORT}(Tproxy) 0 0
154     0 0
155     0 0
156     none
157     none
158     0
159     none
160     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M"
161 if [ "${RET}" != "${EXPECT}" ]
162 then
163         echo "Test failed: $L7VSADM -V -n"
164         exit 1
165 fi
166
167 $L7VSADM -E -t 127.0.0.1:40001 -m sessionless -f 1
168 if [ $? -ne 0 ]
169 then
170         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40001 -m sessionless -f 1"
171         exit 1
172 fi
173
174 $L7VSADM -E -t 127.0.0.1:40002 -m sessionless -f 1
175 if [ $? -ne 0 ]
176 then
177         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40002 -m sessionless -f 1"
178         exit 1
179 fi
180
181 $L7VSADM -E -t 127.0.0.1:40003 -m sessionless -f 1
182 if [ $? -ne 0 ]
183 then
184         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40003 -m sessionless -f 1"
185         exit 1
186 fi
187
188 $L7VSADM -E -t 127.0.0.1:40004 -m sessionless -f 1
189 if [ $? -ne 0 ]
190 then
191         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40001 -m sessionless -f 1"
192         exit 1
193 fi
194
195 RET=`$L7VSADM -V -n`
196 EXPECT="Layer-7 Virtual Server version 3.0.0
197 L7vsd Log Level:
198 Category                       Level
199 l7vsd_network                  warn
200 l7vsd_network_qos              warn
201 l7vsd_network_bandwidth        warn
202 l7vsd_network_num_connection   warn
203 l7vsd_network_access           warn
204 l7vsd_mainthread               warn
205 l7vsd_virtualservice           warn
206 l7vsd_virtualservice_thread    warn
207 l7vsd_session                  warn
208 l7vsd_session_thread           warn
209 l7vsd_realserver               warn
210 l7vsd_sorryserver              warn
211 l7vsd_module                   warn
212 l7vsd_replication              warn
213 l7vsd_replication_sendthread   warn
214 l7vsd_parameter                warn
215 l7vsd_logger                   warn
216 l7vsd_command                  warn
217 l7vsd_start_stop               warn
218 l7vsd_system                   warn
219 l7vsd_system_memory            warn
220 l7vsd_system_endpoint          warn
221 l7vsd_system_signal            warn
222 l7vsd_system_environment       warn
223 l7vsd_snmpbridge               warn
224 l7vsd_protocol                 warn
225 l7vsd_schedule                 warn
226
227 Replication Mode:
228 SINGLE
229
230 SNMPAgent Connection Status:
231 non-connecting
232
233 SNMPAgent Log Level:
234 Category                       Level
235 snmpagent_start_stop           warn
236 snmpagent_manager_receive      warn
237 snmpagent_manager_send         warn
238 snmpagent_l7vsd_receive        warn
239 snmpagent_l7vsd_send           warn
240 snmpagent_logger               warn
241 snmpagent_parameter            warn
242 snmpagent_system               warn
243 snmpagent_system_memory        warn
244 snmpagent_system_endpoint      warn
245 snmpagent_system_signal        warn
246 snmpagent_system_environment   warn
247
248 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
249      SorryAddress:Port Sorry_cc Sorry_flag
250      QoS-up   Throughput-up
251      QoS-down Throughput-down
252      SSL_config_file
253      Socket option
254      Access_log_flag
255      Access_log_file
256      Access_log_rotate option
257   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
258 TCP 127.0.0.1:40001 sessionless rr --sorry-uri '/'
259     ${SorryServer1_ADDR}:${SorryServer1_PORT}(Masq) 0 1
260     0 0
261     0 0
262     none
263     none
264     0
265     none
266     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
267 TCP 127.0.0.1:40002 sessionless rr --sorry-uri '/'
268     ${SorryServer2_ADDR}:${SorryServer2_PORT}(Masq) 0 1
269     0 0
270     0 0
271     none
272     none
273     0
274     none
275     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
276 TCP 127.0.0.1:40003 sessionless rr --sorry-uri '/'
277     ${SorryServer1_ADDR}:${SorryServer1_PORT}(Tproxy) 0 1
278     0 0
279     0 0
280     none
281     none
282     0
283     none
284     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
285 TCP 127.0.0.1:40004 sessionless rr --sorry-uri '/'
286     ${SorryServer2_ADDR}:${SorryServer2_PORT}(Tproxy) 0 1
287     0 0
288     0 0
289     none
290     none
291     0
292     none
293     --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M"
294 if [ "${RET}" != "${EXPECT}" ]
295 then
296         echo "Test failed: $L7VSADM -V -n"
297         exit 1
298 fi
299
300 exit 0
301