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

baoyuan 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 77c91c26c test(aws): correct secret path and test (#13042)
77c91c26c is described below

commit 77c91c26cca1f6251bc1c6a53c8571a76515afec
Author: Mohammad Izzraff Janius 
<[email protected]>
AuthorDate: Sat Feb 28 16:13:13 2026 +0800

    test(aws): correct secret path and test (#13042)
---
 t/secret/aws.t | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/t/secret/aws.t b/t/secret/aws.t
index ae0e09b63..8342748ff 100644
--- a/t/secret/aws.t
+++ b/t/secret/aws.t
@@ -267,7 +267,7 @@ GET /t
                     "username": "jack",
                     "plugins": {
                           "key-auth": {
-                            "key": "$secret://aws/mysecret/jack/key"
+                            "key": "$secret://aws/mysecret/apisix-key/jack"
                         }
                     }
                 }]]
@@ -279,7 +279,10 @@ GET /t
 
 
             local secret = require("apisix.secret")
-            local value = 
secret.fetch_by_uri("$secret://aws/mysecret/jack/key")
+            local value, err = 
secret.fetch_by_uri("$secret://aws/mysecret/apisix-key/jack")
+            if value then
+                ngx.say("secret value: ", value)
+            end
 
 
             local code, body = t('/apisix/admin/secrets/aws/mysecret', 
ngx.HTTP_DELETE)
@@ -294,7 +297,7 @@ GET /t
                     "username": "jack",
                     "plugins": {
                           "key-auth": {
-                            "key": "$secret://aws/mysecret/jack/key"
+                            "key": "$secret://aws/mysecret/apisix-key/jack"
                         }
                     }
                 }]]
@@ -305,12 +308,14 @@ GET /t
             end
 
             local secret = require("apisix.secret")
-            local value = 
secret.fetch_by_uri("$secret://aws/mysecret/jack/key")
-            if value then
-                ngx.say("secret value: ", value)
+            local value, err = 
secret.fetch_by_uri("$secret://aws/mysecret/apisix-key/jack/key")
+            if err then
+                ngx.say(err)
             end
             ngx.say("all done")
         }
     }
 --- response_body
+secret value: value
+no secret conf, secret_uri: $secret://aws/mysecret/apisix-key/jack/key
 all done

Reply via email to