Firstsawyou commented on a change in pull request #2326:
URL: https://github.com/apache/apisix/pull/2326#discussion_r495534835



##########
File path: t/core/ctx.t
##########
@@ -155,3 +155,264 @@ GET /t?a=aaa
 --- error_code: 500
 --- error_log
 invalid argument, expect string value
+
+
+
+=== TEST 7: add route and get `route_id`
+--- 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,
+                [[{
+                    "methods": ["GET"],
+                    "plugins": {
+                        "serverless-pre-function": {
+                            "phase": "access",
+                            "functions" : ["return function() ngx.log(ngx.ERR, 
\"route_id: \", ngx.ctx.api_ctx.route_id) end"]

Review comment:
       got it




----------------------------------------------------------------
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:
[email protected]


Reply via email to