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/11/07 09:45:23 UTC

[GitHub] [apisix] tokers commented on a diff in pull request #8205: feat: add request body to google-cloud-logging

tokers commented on code in PR #8205:
URL: https://github.com/apache/apisix/pull/8205#discussion_r1015205569


##########
t/plugin/google-cloud-logging.t:
##########
@@ -793,9 +850,90 @@ passed
 
 
 
-=== TEST 27: test route (set include_req_body = true on route succeeds)
+=== TEST 28: set fetch request body and response body route
+--- config
+    location /t {
+        content_by_lua_block {
+            local config = {
+                uri = "/google-cloud-logging/test",
+                method = 'POST',
+                upstream = {
+                    type = "roundrobin",
+                    nodes = {
+                        ["127.0.0.1:12001"] = 1
+                    }
+                },
+                plugins = {
+                    ["google-cloud-logging"] = {
+                        auth_file = "t/plugin/google-cloud-logging/config.json",
+                        inactive_timeout = 1,
+                        batch_max_size = 1,
+                        include_req_body = true,
+                    }
+                }
+            }
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/routes/1', ngx.HTTP_PUT, config)
+
+            if code >= 300 then
+                ngx.status = code
+                ngx.say(body)
+                return
+            end
+
+            ngx.say(body)
+        }
+    }
+--- response_body
+passed
+
+
+
+=== TEST 28: set fetch request body and response body route

Review Comment:
   The sequence number is wrong? It should be `29`.



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