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/06/29 14:20:58 UTC
[GitHub] [apisix] tzssangglass commented on a change in pull request #4479: fix: Multiple request-id bug
tzssangglass commented on a change in pull request #4479:
URL: https://github.com/apache/apisix/pull/4479#discussion_r660667058
##########
File path: t/plugin/request-id.t
##########
@@ -387,3 +387,86 @@ GET /t
request header not present
--- no_error_log
[error]
+
+
+
+=== TEST 10: add plugin with custom header name in global rule and add plugin with default header name in specific route
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/global_rules/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "request-id": {
+ "header_name":"Custom-Header-Name"
+ }
+ }
+ }]]
+ )
+ if code >= 300 then
+ ngx.status = code
+ ngx.say(body)
+ return
+ end
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "request-id": {
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:1982": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/opentracing"
+ }]]
+ )
+ if code >= 300 then
+ ngx.status = code
+ return
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
Review comment:
there should be 3 blank lines between test cases, or you can use the reindex to do. the CI error is about this.
--
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