starsz commented on pull request #6311:
URL: https://github.com/apache/apisix/pull/6311#issuecomment-1047386832


   Hi @zhendongcmss.I think you still misunderstand my point.
   
   > Could you use TEST 10, set "ssl_verify": true, and expect it to fail in 
the --- error_log?
   As @spacewander and I suggested. You can add the follow test:
   
   ```
   === TEST 19: set correct https endpoint and ssl verify true
   --- 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:9999/hello-world-http";,
                                   "batch_max_size": 1,
                                   "max_retry_count": 1,
                                   "retry_delay": 2,
                                   "buffer_duration": 2,
                                   "inactive_timeout": 2,
                                   "ssl_verify": true
                               }
                           },
                           "upstream": {
                               "nodes": {
                                   "127.0.0.1:1982": 1
                               },
                               "type": "roundrobin"
                           },
                           "uri": "/hello1"
                   }]],
                   [[{
                       "node": {
                           "value": {
                               "plugins": {
                                   "http-logger": {
                                       "uri": 
"https://127.0.0.1:9999/hello-world-http";,
                                       "batch_max_size": 1,
                                       "max_retry_count": 1,
                                       "retry_delay": 2,
                                       "buffer_duration": 2,
                                       "inactive_timeout": 2,
                                       "ssl_verify": true
                                   }
                               },
                               "upstream": {
                                   "nodes": {
                                       "127.0.0.1:1982": 1
                                   },
                                   "type": "roundrobin"
                               },
                               "uri": "/hello1"
                           },
                           "key": "/apisix/routes/1"
                      },
                       "action": "set"
                   }]]
                   )
               if code >= 300 then
                   ngx.status = code
               end
               ngx.say(body)
           }
       }
   --- request
   GET /t
   --- response_body
   passed
   --- no_error_log
   [error]
   
   
   === TEST 20: access correct https endpoint but ssl verify failed
   --- request
   GET /hello1
   --- error_log
   self signed certificate in certificate chain
   --- wait: 1.5
   ```
   
   


-- 
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]


Reply via email to