pgIsReady checks if PostgreSQL is running and accepting connections.
()
| 539 | |
| 540 | // pgIsReady checks if PostgreSQL is running and accepting connections. |
| 541 | func pgIsReady() bool { |
| 542 | cmd := exec.Command(pgBin("pg_isready"), "-h", "127.0.0.1", "-p", "5432") |
| 543 | return cmd.Run() == nil |
| 544 | } |
| 545 | |
| 546 | // waitForPostgreSQL polls until PostgreSQL accepts connections or times out. |
| 547 | func waitForPostgreSQL(timeout time.Duration) error { |
no test coverage detected