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 2019/11/07 13:44:32 UTC

[GitHub] [incubator-apisix] moonming commented on a change in pull request #818: feature: support for adding the specified request header for upstream…

moonming commented on a change in pull request #818: feature: support for adding the specified request header for upstream…
URL: https://github.com/apache/incubator-apisix/pull/818#discussion_r343656049
 
 

 ##########
 File path: t/admin/health-check.t
 ##########
 @@ -313,3 +313,80 @@ GET /t
 {"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"active\" validation failed: property \"unhealthy\" validation failed: property \"http_failures\" validation failed: wrong type: expected integer, got number"}
 --- no_error_log
 [error]
+
+
+
+=== TEST 9: valid req_headers
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+
+            req_data.upstream.checks = json.decode([[{
+                "active": {
+                    "http_path": "/status",
+                    "host": "foo.com",
+                    "healthy": {
+                        "interval": 2,
+                        "successes": 1
+                    },
+                    "req_headers": ["User-Agent: curl/7.29.0"]
 
 Review comment:
   need add test cases for muti-headers.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services