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/04/22 10:57:18 UTC

[GitHub] [apisix] tokers commented on a change in pull request #4109: feat: support to fetch balancer ip/port from ctx.var

tokers commented on a change in pull request #4109:
URL: https://github.com/apache/apisix/pull/4109#discussion_r618297188



##########
File path: t/core/ctx2.t
##########
@@ -87,3 +87,52 @@ GET /xxx
 --- error_log
 pre uri: /hello
 post uri: /server_port
+
+
+
+=== TEST 3: get balancer_ip and balancer_port through ctx.var
+--- 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,
+                [[{
+                    "uri": "/hello",
+                    "plugins": {
+                        "serverless-post-function": {
+                            "phase": "log",
+                            "functions" : ["return function(conf, ctx)
+                                        ngx.log(ngx.WARN, 'balancer_ip: ', ctx.var.balancer_ip);

Review comment:
       Redundant semicolons.




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