OSDN Git Service

trunk整理
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / virtualservice / virtualservice-50.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 127.0.0.1:40001 -m ip
15 if [ $? -ne 0 ]
16 then
17         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip"
18         exit 1
19 fi
20
21 $L7VSADM -A -t 127.0.0.1:40002 -m ip
22 if [ $? -ne 0 ]
23 then
24         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40002 -m ip"
25         exit 1
26 fi
27
28 $L7VSADM -E -t 127.0.0.1:40001 -m ip -Q 100K -q 100K
29 if [ $? -ne 0 ]
30 then
31         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40001 -m ip -Q 100K -q 100K"
32         exit 1
33 fi
34
35 $L7VSADM -E -t 127.0.0.1:40002 -m ip -Q 100M -q 100M
36 if [ $? -ne 0 ]
37 then
38         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40002 -m ip -Q 100M -q 100M"
39         exit 1
40 fi
41
42 RET=`$L7VSADM -V -n`
43 EXPECT="Layer-7 Virtual Server version 3.0.1
44 L7vsd Log Level:
45 Category                       Level
46 l7vsd_network                  warn
47 l7vsd_network_qos              warn
48 l7vsd_network_bandwidth        warn
49 l7vsd_network_num_connection   warn
50 l7vsd_network_access           warn
51 l7vsd_mainthread               warn
52 l7vsd_virtualservice           warn
53 l7vsd_virtualservice_thread    warn
54 l7vsd_session                  warn
55 l7vsd_session_thread           warn
56 l7vsd_realserver               warn
57 l7vsd_sorryserver              warn
58 l7vsd_module                   warn
59 l7vsd_replication              warn
60 l7vsd_replication_sendthread   warn
61 l7vsd_parameter                warn
62 l7vsd_logger                   warn
63 l7vsd_command                  warn
64 l7vsd_start_stop               warn
65 l7vsd_system                   warn
66 l7vsd_system_memory            warn
67 l7vsd_system_endpoint          warn
68 l7vsd_system_signal            warn
69 l7vsd_system_environment       warn
70 l7vsd_snmpagent                info
71 l7vsd_protocol                 warn
72 l7vsd_schedule                 warn
73
74 Replication Mode:
75 SINGLE
76
77 SNMPAgent:
78 Agent Status                   inactive
79 log trap status                none
80 log trap level                 none
81 cache update interval          none
82 start date                     none
83 last request date              none
84 last trap date                 none
85 total GET requests             none
86 total SET requests             none
87 total trap counts              none
88
89 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
90   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
91 TCP 127.0.0.1:40001 ip rr --timeout 3600 --no-reschedule --sorry-uri '/' --statistic 0
92   Bypass Settings:
93     Sorry Server                  none
94     Max Connection                0
95     Sorry Flag                    off
96   SSL Settings:
97     SSL Config File               none
98   Logging Settings:
99     Access Log                    off
100     Access Log File               none
101     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
102   Socket Settings:
103     TCP_DEFER_ACCEPT              disable
104     TCP_NODELAY                   disable
105     TCP_CORK                      disable
106     TCP_QUICKACK                  auto
107   Throughput:
108     Current Upload / Limit        0.000000 Mbps / 0.100000 Mbps
109     Current Download / Limit      0.000000 Mbps / 0.100000 Mbps
110   Statistics:
111     HTTP Total Requests           0
112     HTTP GET Requests             0
113     HTTP POST Requests            0
114 TCP 127.0.0.1:40002 ip rr --timeout 3600 --no-reschedule --sorry-uri '/' --statistic 0
115   Bypass Settings:
116     Sorry Server                  none
117     Max Connection                0
118     Sorry Flag                    off
119   SSL Settings:
120     SSL Config File               none
121   Logging Settings:
122     Access Log                    off
123     Access Log File               none
124     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
125   Socket Settings:
126     TCP_DEFER_ACCEPT              disable
127     TCP_NODELAY                   disable
128     TCP_CORK                      disable
129     TCP_QUICKACK                  auto
130   Throughput:
131     Current Upload / Limit        0.000000 Mbps / 100.000000 Mbps
132     Current Download / Limit      0.000000 Mbps / 100.000000 Mbps
133   Statistics:
134     HTTP Total Requests           0
135     HTTP GET Requests             0
136     HTTP POST Requests            0"
137
138 if [ "${RET}" != "${EXPECT}" ]
139 then
140         echo "Test failed: $L7VSADM -V -n"
141         exit 1
142 fi
143
144 exit 0
145