OSDN Git Service

マージしたコードに対応
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-3-37.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:40002 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} --tproxy
35 if [ $? -ne 0 ]
36 then
37         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40002 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} --tproxy"
38         exit 1
39 fi
40
41 $L7VSADM -A -t 127.0.0.1:40004 -m sessionless -b ${SorryServer2_ADDR}:${SorryServer2_PORT} --tproxy
42 if [ $? -ne 0 ]
43 then
44         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40004 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} --tproxy"
45         exit 1
46 fi
47
48 RET=`$L7VSADM -V -n`
49 EXPECT="Layer-7 Virtual Server version 3.0.0
50 L7vsd Log Level:
51 Category                       Level
52 l7vsd_network                  warn
53 l7vsd_network_qos              warn
54 l7vsd_network_bandwidth        warn
55 l7vsd_network_num_connection   warn
56 l7vsd_network_access           warn
57 l7vsd_mainthread               warn
58 l7vsd_virtualservice           warn
59 l7vsd_virtualservice_thread    warn
60 l7vsd_session                  warn
61 l7vsd_session_thread           warn
62 l7vsd_realserver               warn
63 l7vsd_sorryserver              warn
64 l7vsd_module                   warn
65 l7vsd_replication              warn
66 l7vsd_replication_sendthread   warn
67 l7vsd_parameter                warn
68 l7vsd_logger                   warn
69 l7vsd_command                  warn
70 l7vsd_start_stop               warn
71 l7vsd_system                   warn
72 l7vsd_system_memory            warn
73 l7vsd_system_endpoint          warn
74 l7vsd_system_signal            warn
75 l7vsd_system_environment       warn
76 l7vsd_snmpagent                info
77 l7vsd_protocol                 warn
78 l7vsd_schedule                 warn
79
80 Replication Mode:
81 SINGLE
82
83 SNMPAgent:
84 Agent Status                   inactive
85 log trap status                none
86 log trap level                 none
87 cache update interval          none
88 start date                     none
89 last request date              none
90 last trap date                 none
91 total GET requests             none
92 total SET requests             none
93 total trap counts              none
94
95 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
96   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
97 TCP 127.0.0.1:40002 sessionless rr --sorry-uri '/' --statistic 0
98   Bypass Settings:
99     Sorry Server                  127.0.0.1:50001 Tproxy
100     Max Connection                0
101     Sorry Flag                    off
102   SSL Settings:
103     SSL Config File               none
104   Logging Settings:
105     Access Log                    off
106     Access Log File               none
107     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
108   Socket Settings:
109     TCP_DEFER_ACCEPT              disable
110     TCP_NODELAY                   disable
111     TCP_CORK                      disable
112     TCP_QUICKACK                  auto
113   Throughput:
114     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
115     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
116   Statistics:
117     HTTP Total Requests           0
118     HTTP GET Requests             0
119     HTTP POST Requests            0
120 TCP 127.0.0.1:40004 sessionless rr --sorry-uri '/' --statistic 0
121   Bypass Settings:
122     Sorry Server                  [::1]:50002 Tproxy
123     Max Connection                0
124     Sorry Flag                    off
125   SSL Settings:
126     SSL Config File               none
127   Logging Settings:
128     Access Log                    off
129     Access Log File               none
130     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
131   Socket Settings:
132     TCP_DEFER_ACCEPT              disable
133     TCP_NODELAY                   disable
134     TCP_CORK                      disable
135     TCP_QUICKACK                  auto
136   Throughput:
137     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
138     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
139   Statistics:
140     HTTP Total Requests           0
141     HTTP GET Requests             0
142     HTTP POST Requests            0"
143 if [ "${RET}" != "${EXPECT}" ]
144 then
145         echo "Test failed: $L7VSADM -V -n"
146         exit 1
147 fi
148
149 $L7VSADM -E -t 127.0.0.1:40002 -m sessionless --masq
150 if [ $? -ne 0 ]
151 then
152         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40002 -m sessionless --masq"
153         exit 1
154 fi
155
156 $L7VSADM -E -t 127.0.0.1:40004 -m sessionless --masq
157 if [ $? -ne 0 ]
158 then
159         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40004 -m sessionless --masq"
160         exit 1
161 fi
162
163 RET=`$L7VSADM -V -n`
164 EXPECT="Layer-7 Virtual Server version 3.0.0
165 L7vsd Log Level:
166 Category                       Level
167 l7vsd_network                  warn
168 l7vsd_network_qos              warn
169 l7vsd_network_bandwidth        warn
170 l7vsd_network_num_connection   warn
171 l7vsd_network_access           warn
172 l7vsd_mainthread               warn
173 l7vsd_virtualservice           warn
174 l7vsd_virtualservice_thread    warn
175 l7vsd_session                  warn
176 l7vsd_session_thread           warn
177 l7vsd_realserver               warn
178 l7vsd_sorryserver              warn
179 l7vsd_module                   warn
180 l7vsd_replication              warn
181 l7vsd_replication_sendthread   warn
182 l7vsd_parameter                warn
183 l7vsd_logger                   warn
184 l7vsd_command                  warn
185 l7vsd_start_stop               warn
186 l7vsd_system                   warn
187 l7vsd_system_memory            warn
188 l7vsd_system_endpoint          warn
189 l7vsd_system_signal            warn
190 l7vsd_system_environment       warn
191 l7vsd_snmpagent                info
192 l7vsd_protocol                 warn
193 l7vsd_schedule                 warn
194
195 Replication Mode:
196 SINGLE
197
198 SNMPAgent:
199 Agent Status                   inactive
200 log trap status                none
201 log trap level                 none
202 cache update interval          none
203 start date                     none
204 last request date              none
205 last trap date                 none
206 total GET requests             none
207 total SET requests             none
208 total trap counts              none
209
210 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
211   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
212 TCP 127.0.0.1:40002 sessionless rr --sorry-uri '/' --statistic 0
213   Bypass Settings:
214     Sorry Server                  127.0.0.1:50001 Masq
215     Max Connection                0
216     Sorry Flag                    off
217   SSL Settings:
218     SSL Config File               none
219   Logging Settings:
220     Access Log                    off
221     Access Log File               none
222     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
223   Socket Settings:
224     TCP_DEFER_ACCEPT              disable
225     TCP_NODELAY                   disable
226     TCP_CORK                      disable
227     TCP_QUICKACK                  auto
228   Throughput:
229     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
230     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
231   Statistics:
232     HTTP Total Requests           0
233     HTTP GET Requests             0
234     HTTP POST Requests            0
235 TCP 127.0.0.1:40004 sessionless rr --sorry-uri '/' --statistic 0
236   Bypass Settings:
237     Sorry Server                  [::1]:50002 Masq
238     Max Connection                0
239     Sorry Flag                    off
240   SSL Settings:
241     SSL Config File               none
242   Logging Settings:
243     Access Log                    off
244     Access Log File               none
245     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
246   Socket Settings:
247     TCP_DEFER_ACCEPT              disable
248     TCP_NODELAY                   disable
249     TCP_CORK                      disable
250     TCP_QUICKACK                  auto
251   Throughput:
252     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
253     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
254   Statistics:
255     HTTP Total Requests           0
256     HTTP GET Requests             0
257     HTTP POST Requests            0"
258 if [ "${RET}" != "${EXPECT}" ]
259 then
260         echo "Test failed: $L7VSADM -V -n"
261         exit 1
262 fi
263
264 exit 0
265