Browse Source

Add prefix to 'warning' in the update message so tests don't fail

pull/753/head
Tim Kimber 4 years ago
parent
commit
16d971956e
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      getssl
  2. +1
    -1
      test/test_helper.bash

+ 4
- 2
getssl View File

@ -283,7 +283,7 @@
# 2021-12-22 Don't show usage if run with --upgrade (#728) # 2021-12-22 Don't show usage if run with --upgrade (#728)
# 2021-12-23 Don't use +idnout if dig shows a warning (#688) # 2021-12-23 Don't use +idnout if dig shows a warning (#688)
# 2022-01-06 Support --account-id (#716)(2.46) # 2022-01-06 Support --account-id (#716)(2.46)
# 2022-03-09 Support for ISPConfig API (2.47)
# 2022-03-09 Support for ISPConfig API
# ---------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------
case :$SHELLOPTS: in case :$SHELLOPTS: in
@ -803,7 +803,9 @@ check_getssl_upgrade() { # check if a more recent release is available
error_exit "curl error checking releases: $errcode" error_exit "curl error checking releases: $errcode"
fi fi
# Replace error in release description with _error (which is ignored by check_output_for_errors() in the tests) # Replace error in release description with _error (which is ignored by check_output_for_errors() in the tests)
debug "${release_data//error/_error}"
sanitised_release_data=${release_data//error/_error}
sanitised_release_data=${sanitised_release_data//warning/_warning}
debug "${sanitised_release_data//error/_error}"
# awk from https://stackoverflow.com/questions/1761341/awk-print-next-record-following-matched-record # awk from https://stackoverflow.com/questions/1761341/awk-print-next-record-following-matched-record
release_tag=$(awk -F'"' '/tag_name/ {f=NR} f&&NR-1==f' RS=":|," <<<"${release_data}" | sed -e's/"//g') release_tag=$(awk -F'"' '/tag_name/ {f=NR} f&&NR-1==f' RS=":|," <<<"${release_data}" | sed -e's/"//g')
if [[ "${release_tag:0:1}" != 'v' ]] ; then if [[ "${release_tag:0:1}" != 'v' ]] ; then


+ 1
- 1
test/test_helper.bash View File

@ -25,7 +25,7 @@ check_nginx() {
check_output_for_errors() { check_output_for_errors() {
refute_output --regexp '[Ff][Aa][Ii][Ll][Ee][Dd]' refute_output --regexp '[Ff][Aa][Ii][Ll][Ee][Dd]'
refute_output --regexp '[^_][Ee][Rr][Rr][Oo][Rr][^:nonce]' refute_output --regexp '[^_][Ee][Rr][Rr][Oo][Rr][^:nonce]'
refute_output --regexp '[Ww][Aa][Rr][Nn][Ii][Nn][Gg]'
refute_output --regexp '[^_][Ww][Aa][Rr][Nn][Ii][Nn][Gg]'
refute_line --partial 'command not found' refute_line --partial 'command not found'
} }


Loading…
Cancel
Save