Skip to content

Commit 749a9bc

Browse files
authored
test(basic-auth): store the vault secret before the consumer references it (#13853)
1 parent 1719001 commit 749a9bc

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

t/plugin/basic-auth.t

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,15 @@ Authorization: Basic Zm9vOmJhcg==
475475

476476

477477

478-
=== TEST 22: set basic-auth conf: password uses secret ref
478+
=== TEST 22: store secret into vault
479+
--- exec
480+
VAULT_TOKEN='root' VAULT_ADDR='http://0.0.0.0:8200' vault kv put kv/apisix/foo passwd=bar
481+
--- response_body
482+
Success! Data written to: kv/apisix/foo
483+
484+
485+
486+
=== TEST 23: set basic-auth conf: password uses secret ref
479487
--- request
480488
GET /t
481489
--- config
@@ -545,14 +553,6 @@ passed
545553

546554

547555

548-
=== TEST 23: store secret into vault
549-
--- exec
550-
VAULT_TOKEN='root' VAULT_ADDR='http://0.0.0.0:8200' vault kv put kv/apisix/foo passwd=bar
551-
--- response_body
552-
Success! Data written to: kv/apisix/foo
553-
554-
555-
556556
=== TEST 24: verify Authorization with foo/bar, request header should not hidden
557557
--- request
558558
GET /echo

0 commit comments

Comments
 (0)