Skip to content

Commit 9eff17a

Browse files
committed
Fix the replication test.
1 parent 2db7486 commit 9eff17a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmd/postgres_exporter/tests/docker-postgres-replication/Dockerfile.p2

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM postgres:{{VERSION}}
22
MAINTAINER Daniel Dent (https://www.danieldent.com)
33
ENV PG_MAX_WAL_SENDERS 8
44
ENV PG_WAL_KEEP_SEGMENTS 8
5+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y inetutils-ping
56
COPY setup-replication.sh /docker-entrypoint-initdb.d/
67
COPY docker-entrypoint.sh /docker-entrypoint.sh
78
RUN chmod +x /docker-entrypoint-initdb.d/setup-replication.sh /docker-entrypoint.sh

cmd/postgres_exporter/tests/docker-postgres-replication/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ "$1" = 'postgres' ]; then
3636
if [ "x$REPLICATE_FROM" == "x" ]; then
3737
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
3838
else
39-
until ping -c 1 -W 1 ${REPLICATE_FROM}
39+
until /bin/ping -c 1 -W 1 ${REPLICATE_FROM}
4040
do
4141
echo "Waiting for master to ping..."
4242
sleep 1s

0 commit comments

Comments
 (0)