diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /scripts/utils.sh | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh index e896fe40e06..ae071b98b43 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -15,16 +15,18 @@ function retry() { function test_url() { local url="${1}" - local curl_output="${2}" local status - status=$(curl -s -o "${curl_output}" -L -w ''%{http_code}'' "${url}") + status=$(curl --output /dev/null -L -s -w ''%{http_code}'' "${url}") if [[ $status == "200" ]]; then return 0 + else + # We display the error in the job to allow for better debugging + curl -L --fail --output /dev/null "${url}" + echo -e "\nExpected HTTP status 200: received ${status}\n" + return 1 fi - - return 1 } function bundle_install_script() { @@ -59,9 +61,14 @@ function setup_db_user_only() { source scripts/create_postgres_user.sh } +function setup_db_praefect() { + createdb -h postgres -U postgres --encoding=UTF8 --echo praefect_test +} + function setup_db() { run_timed_command "setup_db_user_only" run_timed_command_with_metric "bundle exec rake db:drop db:create db:structure:load db:migrate gitlab:db:setup_ee" "setup_db" + run_timed_command "setup_db_praefect" } function install_api_client_dependencies_with_apk() { |