@@ -105,11 +105,11 @@ done
105
105
}
106
106
--- request
107
107
GET /t
108
- --- response_body
109
- foo .com:1234: [ {"addr":"127.0.0 .1:80","fail_timeout":53,"max_fails":100,"name":"127.0.0 .1","weight":4}, {"addr":"138.68.231.133 :81","backup":true,"fail_timeout":10,"max_fails":1,"name":"agentzh.org:81","weight":1} ]
110
- bar: [ {"addr":"127.0.0 .2:80","fail_timeout":10,"max_fails":1,"name":"127.0.0 .2","weight":1} ]
108
+ --- response_body_like chomp
109
+ \Afoo\ .com:1234: \[\ {"addr":"127\.0\.0\ .1:80","fail_timeout":53,"max_fails":100,"name":"127\.0\.0\ .1","weight":4\},\ {"addr":(?:\[?"\d+\.\d+\.\d+\.\d+ :81",?\]?)+, "backup":true,"fail_timeout":10,"max_fails":1,"name":"agentzh\ .org:81","weight":1\}\ ]
110
+ bar: \[\ {"addr":"127\.0\.0\ .2:80","fail_timeout":10,"max_fails":1,"name":"127\.0\.0\ .2","weight":1\}\ ]
111
111
failed to get servers: upstream not found
112
-
112
+ \z
113
113
--- no_error_log
114
114
[error]
115
115
@@ -173,12 +173,13 @@ failed to get servers: upstream not found
173
173
}
174
174
--- request
175
175
GET /upstreams
176
- --- response_body
177
- upstream foo.com:
178
- addr = 127.0.0 .1:80, fail_timeout = 53, max_fails = 100, name = 127.0.0 .1, weight = 4
179
- addr = 138.68.231.133 :81, fail_timeout = 10, max_fails = 1, name = agentzh.org:81, weight = 1
176
+ --- response_body_like chomp
177
+ \Aupstream foo\ .com:
178
+ addr = 127\.0\.0\ .1:80, fail_timeout = 53, max_fails = 100, name = 127\.0\.0\ .1, weight = 4
179
+ addr = \{?(?:\d+\.\d+\.\d+\.\d+ :81(?:,\s)?)+\}?, fail_timeout = 10, max_fails = 1, name = agentzh\ .org:81, weight = 1
180
180
upstream bar:
181
- addr = 127.0.0.2:80, fail_timeout = 10, max_fails = 1, name = 127.0.0.2, weight = 1
181
+ addr = 127\.0\.0\.2:80, fail_timeout = 10, max_fails = 1, name = 127\.0\.0\.2, weight = 1
182
+ \z
182
183
--- no_error_log
183
184
[error]
184
185
@@ -274,9 +275,10 @@ upstream bar:
274
275
}
275
276
--- request
276
277
GET /t
277
- --- response_body
278
- [{"conns":0,"current_weight":0,"effective_weight":4,"fail_timeout":53,"fails":0,"id":0,"max_fails":100,"name":"127.0.0.1:80","weight":4},{"conns":0,"current_weight":0,"effective_weight":1,"fail_timeout":10,"fails":0,"id":1,"max_fails":1,"name":"138.68.231.133:81","weight":1}]
279
- [{"conns":0,"current_weight":0,"effective_weight":1,"fail_timeout":10,"fails":0,"id":0,"max_fails":1,"name":"127.0.0.2:80","weight":1}]
278
+ --- response_body_like chomp
279
+ \A\[\{"conns":0,"current_weight":0,"effective_weight":4,"fail_timeout":53,"fails":0,"id":0,"max_fails":100,"name":"127\.0\.0\.1:80","weight":4\},(?:\{"conns":0,"current_weight":0,"effective_weight":1,"fail_timeout":10,"fails":0,"id":\d+,"max_fails":1,"name":"\d+\.\d+\.\d+\.\d+:81","weight":1\},?)+\]
280
+ \[\{"conns":0,"current_weight":0,"effective_weight":1,"fail_timeout":10,"fails":0,"id":0,"max_fails":1,"name":"127\.0\.0\.2:80","weight":1\}\]
281
+ \z
280
282
--- no_error_log
281
283
[error]
282
284
0 commit comments