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 2021/11/30 09:27:11 UTC

[GitHub] [apisix] shuaijinchao commented on a change in pull request #5646: fix: google cloud logging plugin file config error

shuaijinchao commented on a change in pull request #5646:
URL: https://github.com/apache/apisix/pull/5646#discussion_r759083813



##########
File path: t/plugin/google-cloud-logging.t
##########
@@ -509,3 +509,99 @@ qr/\{\"error\"\:\"[\w+\s+]*\"\}/
 --- error_log
 Batch Processor[google-cloud-logging] failed to process entries
 Batch Processor[google-cloud-logging] exceeded the max_retry_count
+
+
+
+=== TEST 16: set route (succeed write)
+--- config
+    location /t {
+        content_by_lua_block {
+
+            local config = {
+                uri = "/hello",
+                upstream = {
+                    type = "roundrobin",
+                    nodes = {
+                        ["127.0.0.1:1980"] = 1
+                    }
+                },
+                plugins = {
+                    ["google-cloud-logging"] = {
+                        auth_file = "t/plugin/google-cloud-logging-configuration.json",
+                        inactive_timeout = 1,
+                        batch_max_size = 1,
+                    }
+                }
+            }
+            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 17: test route(succeed write)
+--- request
+GET /hello
+--- wait: 2
+--- response_body
+hello world
+
+
+
+=== TEST 18: set route (succeed write)

Review comment:
       updated




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