Browse Source

Trim newline from uri (intermittent test failure)

Fix sleep calc for bash4-2/centos7 in check_github_quota
test_newline_change
Tim Kimber 3 years ago
parent
commit
129b51f9d1
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
2 changed files with 4 additions and 2 deletions
  1. +2
    -0
      getssl
  2. +2
    -2
      test/test_helper.bash

+ 2
- 0
getssl View File

@ -1418,6 +1418,8 @@ for d in "${alldomains[@]}"; do
# get the token and uri from the dns-01 component
token=$(json_get "$response" "challenges" "type" "dns-01" "token")
uri=$(json_get "$response" "challenges" "type" "dns-01" "url")
# when using pebble this sometimes appears to have a newline which causes problems in send_signed_request
uri=$(echo "$uri" | tr -d '\r')
debug uri "$uri"
fi


+ 2
- 2
test/test_helper.bash View File

@ -38,8 +38,8 @@ check_github_quota() {
fi
now="$(date +%s)"
while [[ "$now" -lt "$reset" ]] ; do
echo "# sleeping $(( "$reset" - "$now" )) seconds for GitHub quota"
sleep "$(( "$reset" - "$now" ))"
echo "# sleeping $(( reset - now )) seconds for GitHub quota"
sleep "$(( reset - now ))"
now="$(date +%s)"
done
done


Loading…
Cancel
Save