mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02:00
cacememdb: add LeaseToken and TokenParent tests for GetByPrefix
This commit is contained in:
parent
b2411f2a63
commit
6e96688719
@ -131,8 +131,10 @@ func TestCacheMemDB_GetByPrefix(t *testing.T) {
|
||||
Namespace: "test_ns/",
|
||||
RequestPath: "/v1/request/path/1",
|
||||
Token: "test_token",
|
||||
TokenParent: "test_token_parent",
|
||||
TokenAccessor: "test_accessor",
|
||||
Lease: "path/to/test_lease/1",
|
||||
LeaseToken: "test_lease_token",
|
||||
Response: []byte("hello world"),
|
||||
}
|
||||
|
||||
@ -146,8 +148,10 @@ func TestCacheMemDB_GetByPrefix(t *testing.T) {
|
||||
Namespace: "test_ns/",
|
||||
RequestPath: "/v1/request/path/2",
|
||||
Token: "test_token2",
|
||||
TokenParent: "test_token_parent",
|
||||
TokenAccessor: "test_accessor2",
|
||||
Lease: "path/to/test_lease/2",
|
||||
LeaseToken: "test_lease_token",
|
||||
Response: []byte("hello world"),
|
||||
}
|
||||
|
||||
@ -170,6 +174,16 @@ func TestCacheMemDB_GetByPrefix(t *testing.T) {
|
||||
"lease",
|
||||
[]interface{}{"path/to/test_lease"},
|
||||
},
|
||||
{
|
||||
"by_token_parent",
|
||||
"token_parent",
|
||||
[]interface{}{"test_token_parent"},
|
||||
},
|
||||
{
|
||||
"by_lease_token",
|
||||
"lease_token",
|
||||
[]interface{}{"test_lease_token"},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user