@@ -45,8 +45,9 @@ function getRedisConnectionDefaultsImpl(url?: string): {
4545
4646/**
4747 * Controllable mock functions for `@/lib/core/config/redis`.
48- * Default: `getRedisClient` returns `null` (tests that need a client override
49- * it), matching the real module's behavior when `REDIS_URL` is unset.
48+ * Default: `getConfiguredRedisUrl` and `getRedisClient` return `null` (tests
49+ * that need Redis override them), matching the real module's database-cache
50+ * behavior.
5051 * `acquireLock`/`releaseLock`/`extendLock` default to succeeding (`true`),
5152 * matching the real module's Redis-unavailable no-op path.
5253 * {@link resetRedisConfigMock} restores the default behaviors.
@@ -59,6 +60,7 @@ function getRedisConnectionDefaultsImpl(url?: string): {
5960 * ```
6061 */
6162export const redisConfigMockFns = {
63+ mockGetConfiguredRedisUrl : vi . fn ( ) . mockReturnValue ( null ) ,
6264 mockGetRedisClient : vi . fn ( ) . mockReturnValue ( null ) ,
6365 mockGetRedisConnectionDefaults : vi . fn ( getRedisConnectionDefaultsImpl ) ,
6466 mockOnRedisReconnect : vi . fn ( ) ,
@@ -73,6 +75,7 @@ export const redisConfigMockFns = {
7375 * Restores every redis-config mock function to its default behavior.
7476 */
7577export function resetRedisConfigMock ( ) : void {
78+ redisConfigMockFns . mockGetConfiguredRedisUrl . mockReset ( ) . mockReturnValue ( null )
7679 redisConfigMockFns . mockGetRedisClient . mockReset ( ) . mockReturnValue ( null )
7780 redisConfigMockFns . mockGetRedisConnectionDefaults
7881 . mockReset ( )
@@ -95,6 +98,7 @@ export function resetRedisConfigMock(): void {
9598 * ```
9699 */
97100export const redisConfigMock = {
101+ getConfiguredRedisUrl : redisConfigMockFns . mockGetConfiguredRedisUrl ,
98102 getRedisClient : redisConfigMockFns . mockGetRedisClient ,
99103 getRedisConnectionDefaults : redisConfigMockFns . mockGetRedisConnectionDefaults ,
100104 onRedisReconnect : redisConfigMockFns . mockOnRedisReconnect ,
0 commit comments