diff --git a/command/agent/cache/cachememdb/cache_memdb_test.go b/command/agent/cache/cachememdb/cache_memdb_test.go index 119943c311..4162fed0da 100644 --- a/command/agent/cache/cachememdb/cache_memdb_test.go +++ b/command/agent/cache/cachememdb/cache_memdb_test.go @@ -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 {