MCPcopy Index your code
hub / github.com/cloudgraphdev/cli / initDgraphContainer

Function initDgraphContainer

test/helpers/index.ts:290–307  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

288}
289
290export const initDgraphContainer = async (): Promise<void> => {
291 try {
292 await ConfigCommand.load()
293 logger.debug(ConfigCommand.dataDir)
294 await stopDgraphContainer(true)
295 fileUtils.makeDirIfNotExists(path.join(dataDir, testDGraphDirectory))
296 await execCommand(
297 `docker run -d -p 8995:5080 -p 8996:6080 -p ${testStorageConfig.port}:8080 -p 8998:9080 -p 8999:8000 --label ${
298 DGRAPH_CONTAINER_LABEL
299 } -v ${dataDir}${testDGraphDirectory}:/dgraph --name dgraph ${DGRAPH_DOCKER_IMAGE_NAME}`
300 )
301 logger.debug('DGraph instance started!')
302 await LaunchCommand.checkIfInstanceIsRunningReportStatus()
303 } catch (error) {
304 logger.debug('Error while starting dgraph container')
305 logger.debug(error)
306 }
307}
308
309export const getQueryEngineEndpoint = (): string => {
310 ServeCommand.config.configDir = configDir

Callers 2

serve.test.tsFile · 0.90
teardown.test.tsFile · 0.90

Calls 3

execCommandFunction · 0.90
stopDgraphContainerFunction · 0.85

Tested by

no test coverage detected