MCPcopy
hub / github.com/sqlc-dev/sqlc / Installed

Function Installed

internal/sqltest/docker/enabled.go:12–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10var flight singleflight.Group
11
12func Installed() error {
13 if _, err := exec.LookPath("docker"); err != nil {
14 return fmt.Errorf("docker not found: %w", err)
15 }
16 // Verify the Docker daemon is actually running and accessible.
17 // Without this check, tests will try Docker, fail on docker pull,
18 // and t.Fatal instead of falling back to native database support.
19 if out, err := exec.Command("docker", "info").CombinedOutput(); err != nil {
20 return fmt.Errorf("docker daemon not available: %w\n%s", err, out)
21 }
22 return nil
23}

Callers 7

TestExpandPostgreSQLFunction · 0.92
TestExpandMySQLFunction · 0.92
TestReplayFunction · 0.92
MySQLFunction · 0.92
postgreSQLFunction · 0.92
StartMySQLServerFunction · 0.85
StartPostgreSQLServerFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestExpandPostgreSQLFunction · 0.74
TestExpandMySQLFunction · 0.74
TestReplayFunction · 0.74