This is an automated email from the ASF dual-hosted git repository.

monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new a41e5fd84 fix: add default value for range_id object (#9947)
a41e5fd84 is described below

commit a41e5fd845063515bea4a32eee648465c39d31ef
Author: Abhishek Choudhary <shreemaan.abhis...@gmail.com>
AuthorDate: Thu Aug 3 19:47:42 2023 +0545

    fix: add default value for range_id object (#9947)
---
 apisix/plugins/request-id.lua |  3 ++-
 t/plugin/request-id2.t        | 10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/apisix/plugins/request-id.lua b/apisix/plugins/request-id.lua
index b9f1e94c6..dac3162db 100644
--- a/apisix/plugins/request-id.lua
+++ b/apisix/plugins/request-id.lua
@@ -49,7 +49,8 @@ local schema = {
                     minLength = 6,
                     default = 
"abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ0123456789"
                 }
-            }
+            },
+            default = {}
         }
     }
 }
diff --git a/t/plugin/request-id2.t b/t/plugin/request-id2.t
index a66c6b3dd..421a0891c 100644
--- a/t/plugin/request-id2.t
+++ b/t/plugin/request-id2.t
@@ -70,7 +70,7 @@ passed
 
 
 
-=== TEST 2: add plugin with algorithm range_id
+=== TEST 2: add plugin with algorithm range_id (set automatic default)
 --- config
     location /t {
         content_by_lua_block {
@@ -103,7 +103,13 @@ passed
 
 
 
-=== TEST 3: add plugin with algorithm range_id
+=== TEST 3: hit
+--- request
+GET /opentracing
+
+
+
+=== TEST 4: add plugin with algorithm range_id
 --- config
     location /t {
         content_by_lua_block {

Reply via email to