File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -236,3 +236,39 @@ GET /a
236236-- - no_error_log
237237[error]
238238[warn ]
239+
240+
241+ === TEST 8 : Errors when not initialized
242+ -- - http_config eval: $::HttpConfig
243+ -- - config
244+ location = /a {
245+ content_by_lua '
246+ local http = require "resty.http"
247+
248+ local res, err = http:set_timeout(500)
249+ if not res then ngx.say(err) end
250+
251+ local res, err = http:ssl_handshake()
252+ if not res then ngx.say(err) end
253+
254+ local res, err = http:set_keepalive()
255+ if not res then ngx.say(err) end
256+
257+ local res, err = http:get_reused_times()
258+ if not res then ngx.say(err) end
259+
260+ local res, err = http:close()
261+ if not res then ngx.say(err) end
262+ ' ;
263+ }
264+ --- request
265+ GET /a
266+ -- - response_body
267+ not initialized
268+ not initialized
269+ not initialized
270+ not initialized
271+ not initialized
272+ -- - no_error_log
273+ [error]
274+ [warn ]
You can’t perform that action at this time.
0 commit comments