MCPcopy
hub / github.com/redis/node-redis / spawnRedisServer

Function spawnRedisServer

packages/test-utils/lib/dockers.ts:227–236  ·  view source on GitHub ↗
(dockerConfig: RedisServerDockerOptions, serverArguments: Array<string>)

Source from the content-addressed store, hash-verified

225}
226
227export function spawnRedisServer(dockerConfig: RedisServerDockerOptions, serverArguments: Array<string>): Promise<RedisServerDocker> {
228 const runningServer = RUNNING_SERVERS.get(serverArguments);
229 if (runningServer) {
230 return runningServer;
231 }
232
233 const dockerPromise = spawnRedisServerDocker(dockerConfig, serverArguments);
234 RUNNING_SERVERS.set(serverArguments, dockerPromise);
235 return dockerPromise;
236}
237
238async function dockerRemove(dockerId: string): Promise<void> {
239 const { stderr } = await execAsync('docker', ['rm', '-f', dockerId]);

Callers 2

testWithClientMethod · 0.90
testWithClientPoolMethod · 0.90

Calls 3

spawnRedisServerDockerFunction · 0.70
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected