test: update Beszel Redis mocks
This commit is contained in:
1 parent
8f9efd0074
commit
addf1c7335
2 files changed
+2
No files matched your search
@@ -13,6 +13,7 @@ const BESZEL_PASSWORD = process.env.BESZEL_TEST_PASSWORD ?? "";
|
||||
const closeAgent = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));
|
||||
|
||||
vi.mock("@homarr/redis", () => ({
|
||||
getIntegrationSessionStoreKey: (integrationId: string) => `session-store:${integrationId}`,
|
||||
createGetSetChannel: () => ({
|
||||
getAsync: vi.fn().mockResolvedValue(null),
|
||||
setAsync: vi.fn().mockResolvedValue(undefined),
|
||||
|
||||
@@ -12,6 +12,7 @@ vi.hoisted(() => {
|
||||
const store = vi.hoisted(() => new Map<string, { value: string; ttlSeconds?: number }>());
|
||||
|
||||
vi.mock("@homarr/redis", () => ({
|
||||
getIntegrationSessionStoreKey: (integrationId: string) => `session-store:${integrationId}`,
|
||||
createGetSetChannel: (name: string) => ({
|
||||
getAsync: () => Promise.resolve(store.get(name)?.value ?? null),
|
||||
setAsync: (value: string, options?: { ttlSeconds?: number }) => {
|
||||
|
||||
Reference in new issue
Block a user