#1320 Wait for Postgres to be running before starting the unit tests
Merged 4 years ago by mprahl. Opened 4 years ago by cqi.
cqi/fm-orchestrator fix-1314  into  master

@@ -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

4 years ago

rebased onto 60b0e8d

4 years ago

Pull-Request has been merged by mprahl

4 years ago