You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/17 04:56:56 UTC

[GitHub] [apisix] soulbird opened a new pull request #6639: test: remove http-https-echo docker image

soulbird opened a new pull request #6639:
URL: https://github.com/apache/apisix/pull/6639


   ### Description
   
   Remove http-https-echo docker image, reduce 3rd dependencies
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #6639: test: remove http-https-echo docker image

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #6639:
URL: https://github.com/apache/apisix/pull/6639


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on a change in pull request #6639: test: remove http-https-echo docker image

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on a change in pull request #6639:
URL: https://github.com/apache/apisix/pull/6639#discussion_r831118300



##########
File path: t/plugin/http-logger.t
##########
@@ -702,14 +694,60 @@ passed
 GET /t
 --- response_body
 passed
---- no_error_log
-[error]
 
 
 
 === TEST 21: access correct https endpoint but ssl verify failed
 --- 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

Review comment:
       it can also remove, like `no_error_log`  and `[error]` 




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on a change in pull request #6639: test: remove http-https-echo docker image

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] soulbird commented on a change in pull request #6639: test: remove http-https-echo docker image

Posted by GitBox <gi...@apache.org>.
soulbird commented on a change in pull request #6639:
URL: https://github.com/apache/apisix/pull/6639#discussion_r831135553



##########
File path: t/plugin/http-logger.t
##########
@@ -702,14 +694,60 @@ passed
 GET /t
 --- response_body
 passed
---- no_error_log
-[error]
 
 
 
 === TEST 21: access correct https endpoint but ssl verify failed
 --- 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

Review comment:
       great




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org