MCPcopy Create free account
hub / github.com/cortexproject/cortex / existDockerNetwork

Function existDockerNetwork

integration/e2e/scenario.go:201–209  ·  view source on GitHub ↗
(networkName string)

Source from the content-addressed store, hash-verified

199}
200
201func existDockerNetwork(networkName string) (bool, error) {
202 out, err := RunCommandAndGetOutput("docker", "network", "ls", "--quiet", "--filter", fmt.Sprintf("name=%s", networkName))
203 if err != nil {
204 logger.Log(string(out))
205 logger.Log("Unable to check if docker network", networkName, "exists:", err.Error())
206 }
207
208 return strings.TrimSpace(string(out)) != "", nil
209}

Callers 1

shutdownMethod · 0.85

Calls 3

RunCommandAndGetOutputFunction · 0.85
LogMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected