Cache: Refactor cache clients to use byte array (#62930)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist
2023-02-08 10:30:20 +01:00
committed by GitHub
parent 2804acd264
commit b88206d98f
7 changed files with 56 additions and 32 deletions

View File

@ -612,7 +612,8 @@ func TestMiddlewareContext(t *testing.T) {
h, err := authproxy.HashCacheKey(hdrName + "-" + group)
require.NoError(t, err)
key := fmt.Sprintf(authproxy.CachePrefix, h)
err = sc.remoteCacheService.Set(context.Background(), key, userID, 0)
userIdBytes := []byte(strconv.FormatInt(userID, 10))
err = sc.remoteCacheService.SetByteArray(context.Background(), key, userIdBytes, 0)
require.NoError(t, err)
sc.fakeReq("GET", "/")