MCPcopy Create free account
hub / github.com/PostHog/duckgres / StopPostgresContainer

Function StopPostgresContainer

tests/integration/harness.go:691–698  ·  view source on GitHub ↗

StopPostgresContainer stops the PostgreSQL Docker container

()

Source from the content-addressed store, hash-verified

689
690// StopPostgresContainer stops the PostgreSQL Docker container
691func StopPostgresContainer() error {
692 testDir := getTestDir()
693 cmdName, cmdArgs := dockerComposeCommand(filepath.Join(testDir, "docker-compose.yml"), "down", "-v")
694 cmd := exec.Command(cmdName, cmdArgs...)
695 cmd.Stdout = io.Discard
696 cmd.Stderr = io.Discard
697 return cmd.Run()
698}
699
700// IsPostgresRunning checks if the PostgreSQL container is running
701func IsPostgresRunning(port int) bool {

Callers 1

ensureDuckLakeInfraFunction · 0.92

Calls 3

getTestDirFunction · 0.85
dockerComposeCommandFunction · 0.85
RunMethod · 0.65

Tested by 1

ensureDuckLakeInfraFunction · 0.74