shuaijinchao commented on a change in pull request #6639:
URL: https://github.com/apache/apisix/pull/6639#discussion_r830800520
##########
File path: t/plugin/http-logger.t
##########
@@ -711,5 +711,57 @@ passed
--- request
GET /hello1
--- error_log
-self signed certificate in certificate chain
+certificate host mismatch
+--- wait: 3
+
+
+
+=== TEST 22: set correct https endpoint and ssl verify false
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "http-logger": {
+ "uri": "https://127.0.0.1:1983/echo",
+ "batch_max_size": 1,
+ "max_retry_count": 1,
+ "retry_delay": 2,
+ "buffer_duration": 2,
+ "inactive_timeout": 2,
+ "ssl_verify": false
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:1982": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/hello1"
+ }]]
+ )
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 23: access correct https endpoint but ssl verify ok
+--- request
+GET /hello1
+--- no_error_log
+[error]
Review comment:
`no_error_log` can be defined at the top of the file to reduce
redundancy.
https://github.com/apache/apisix/blob/79601b820f15ddb98c85237e8a7b45f3263fb5a1/t/plugin/google-cloud-logging2.t#L24-L35
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]