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/02/05 16:09:46 UTC

[GitHub] [apisix] membphis commented on a change in pull request #3512: feat: the traffic-split plugin supports upstream_id

membphis commented on a change in pull request #3512:
URL: https://github.com/apache/apisix/pull/3512#discussion_r571078351



##########
File path: t/plugin/traffic-split.t
##########
@@ -1972,28 +1964,27 @@ passed
 
 
 
-=== TEST 54: /not_found
---- request
-GET /not_found
---- error_code: 404
---- response_body
-{"error_msg":"404 Route Not Found"}
---- no_error_log
-[error]
---- LAST
-
+=== TEST 54: hit routes
+--- config
+location /t {
+    content_by_lua_block {
+        local t = require("lib.test_admin").test
+        do
+            local code, _ = t('/hello', ngx.HTTP_GET)
+        end
 
-=== TEST 55: hit routes
---- pipelined_requests eval
-["GET /server_port", "GET /server_port"]
---- error_code eval
-[200, 502]
+        local code, _ = t('/hello', ngx.HTTP_GET)
+        if code >= 300 then
+            ngx.status = code
+        end
+    }
+}
+--- request
+GET /t
+--- error_code: 502
 --- grep_error_log eval
 qr/\[error\]/
 --- grep_error_log_out
 [error]

Review comment:
       ```
   [error]
   [error]
   [error]
   ```
   
   this is not a good way to check the error log. we need to confirm the keyword




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