MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / requireValkey

Function requireValkey

apps/api/tests/helpers/valkey.ts:72–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70let warnedAboutSkip = false;
71
72export const requireValkey = async (): Promise<boolean> => {
73 if (await isValkeyReachable()) {
74 return true;
75 }
76
77 if (process.env.REQUIRE_INTEGRATION_VALKEY === "true") {
78 throw new Error("Integration Valkey is required but unreachable");
79 }
80
81 if (!warnedAboutSkip) {
82 console.log(
83 "(valkey-dependent tests skipped — set RUN_VALKEY_NETWORK_TESTS=true and ensure VALKEY_HOST is reachable)"
84 );
85 warnedAboutSkip = true;
86 }
87
88 return false;
89};

Callers 5

acquireCacheFunction · 0.90

Calls 1

isValkeyReachableFunction · 0.85

Tested by 1

acquireCacheFunction · 0.72