60b0e8d
@@ -64,6 +64,15 @@
-d \
$postgres_image
)
+
+ # Waiting for postgres container to start completely in case tests start too fast.
+ while true
+ do
+ docker exec $db_bg_container psql -U postgres -c '\dp' $db_name >/dev/null 2>&1
+ if [ $? == 0 ]; then
+ break
+ fi
+ done
fi
(cd "$source_dir" && docker run "${container_opts[@]}" $test_image "$@")
Fixes #1314
Signed-off-by: Chenxiong Qi cqi@redhat.com
rebased onto 4c5a54006d57aa1e3bb5f12851476dc7cc1c01be
rebased onto 60b0e8d
:thumbsup:
Pull-Request has been merged by mprahl
Fixes #1314
Signed-off-by: Chenxiong Qi cqi@redhat.com