StopPostgresContainer stops the PostgreSQL Docker container
()
| 689 | |
| 690 | // StopPostgresContainer stops the PostgreSQL Docker container |
| 691 | func 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 |
| 701 | func IsPostgresRunning(port int) bool { |