OSDN Git Service

Bug fix. (Line 162: /usr/sbin/l7vsd -b => /usr/sbin/l7vsd)
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-1-23.sh
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 localhost:40001 -m sessionless -f 1
15 if [ $? -ne 0 ]
16 then
17         echo "Test failed: $L7VSADM -A -t localhost:40001 -m sessionless -f 1"
18         exit 1
19 fi
20
21
22 RET=`$L7VSADM -V`
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 localhost:40001 sessionless rr --sorry-uri '/' --statistic 0
72   Bypass Settings:
73     Sorry Server                  none
74     Max Connection                0
75     Sorry Flag                    on
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"
98         exit 1
99 fi
100
101 $L7VSADM -E -t localhost:40001 -m sessionless -f 0
102 if [ $? -ne 0 ]
103 then
104         echo "Test failed: $L7VSADM -E -t localhost:40001 -m sessionless -f 0"
105         exit 1
106 fi
107
108 RET=`$L7VSADM -V`
109 EXPECT="Layer-7 Virtual Server version 3.0.0
110 L7vsd Log Level:
111 Category                       Level
112 l7vsd_network                  warn
113 l7vsd_network_qos              warn
114 l7vsd_network_bandwidth        warn
115 l7vsd_network_num_connection   warn
116 l7vsd_network_access           warn
117 l7vsd_mainthread               warn
118 l7vsd_virtualservice           warn
119 l7vsd_virtualservice_thread    warn
120 l7vsd_session                  warn
121 l7vsd_session_thread           warn
122 l7vsd_realserver               warn
123 l7vsd_sorryserver              warn
124 l7vsd_module                   warn
125 l7vsd_replication              warn
126 l7vsd_replication_sendthread   warn
127 l7vsd_parameter                warn
128 l7vsd_logger                   warn
129 l7vsd_command                  warn
130 l7vsd_start_stop               warn
131 l7vsd_system                   warn
132 l7vsd_system_memory            warn
133 l7vsd_system_endpoint          warn
134 l7vsd_system_signal            warn
135 l7vsd_system_environment       warn
136 l7vsd_snmpagent                info
137 l7vsd_protocol                 warn
138 l7vsd_schedule                 warn
139
140 Replication Mode:
141 SINGLE
142
143 SNMPAgent:
144 Agent Status                   inactive
145 log trap status                none
146 log trap level                 none
147 cache update interval          none
148 start date                     none
149 last request date              none
150 last trap date                 none
151 total GET requests             none
152 total SET requests             none
153 total trap counts              none
154
155 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
156   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
157 TCP localhost:40001 sessionless rr --sorry-uri '/' --statistic 0
158   Bypass Settings:
159     Sorry Server                  none
160     Max Connection                0
161     Sorry Flag                    off
162   SSL Settings:
163     SSL Config File               none
164   Logging Settings:
165     Access Log                    off
166     Access Log File               none
167     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
168   Socket Settings:
169     TCP_DEFER_ACCEPT              disable
170     TCP_NODELAY                   disable
171     TCP_CORK                      disable
172     TCP_QUICKACK                  auto
173   Throughput:
174     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
175     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
176   Statistics:
177     HTTP Total Requests           0
178     HTTP GET Requests             0
179     HTTP POST Requests            0"
180
181 if [ "${RET}" != "${EXPECT}" ]
182 then
183         echo "Test failed: $L7VSADM -V"
184         exit 1
185 fi
186
187 exit 0
188