Unverified Commit 3b7be478 authored by Malte Rabenseifner's avatar Malte Rabenseifner Committed by GitHub
Browse files

Fix stuff from tests

ShellCheck tests have brought up a couple of issues, that I was not aware of needed to be taken care. This should fix the tests.
parent 2014ca9f
...@@ -386,7 +386,7 @@ _pleskxml_get_root_domain() { ...@@ -386,7 +386,7 @@ _pleskxml_get_root_domain() {
# We don't actually need to check for type, name, *and* id, but it guarantees only usable lines are returned. # We don't actually need to check for type, name, *and* id, but it guarantees only usable lines are returned.
output="$(_api_response_split "$pleskxml_prettyprint_result" 'result' '<status>ok</status>' | sed 's/<ascii-name>/<name>/g;s/<\/ascii-name>/<\/name>/g' | grep '<name>' | grep '<id>')" output="$(_api_response_split "$pleskxml_prettyprint_result" 'result' '<status>ok</status>' | sed 's/<ascii-name>/<name>/g;s/<\/ascii-name>/<\/name>/g' | grep '<name>' | grep '<id>')"
debug_output="$(printf "$output" | sed -n 's:.*<name>\(.*\)</name>.*:\1:p')" debug_output="$(printf "%s" "$output" | sed -n 's:.*<name>\(.*\)</name>.*:\1:p')"
_debug 'Domains managed by Plesk server are:' _debug 'Domains managed by Plesk server are:'
_debug "$debug_output" _debug "$debug_output"
...@@ -405,15 +405,15 @@ _pleskxml_get_root_domain() { ...@@ -405,15 +405,15 @@ _pleskxml_get_root_domain() {
# We don't actually need to check for type, name, *and* id, but it guarantees only usable lines are returned. # We don't actually need to check for type, name, *and* id, but it guarantees only usable lines are returned.
output_additional="$(_api_response_split "$pleskxml_prettyprint_result" 'result' '<status>ok</status>' | sed 's/<ascii-name>/<name>/g;s/<\/ascii-name>/<\/name>/g' | grep '<name>' | grep '<id>')" output_additional="$(_api_response_split "$pleskxml_prettyprint_result" 'result' '<status>ok</status>' | sed 's/<ascii-name>/<name>/g;s/<\/ascii-name>/<\/name>/g' | grep '<name>' | grep '<id>')"
debug_additional="$(printf "$output_additional" | sed -n 's:.*<name>\(.*\)</name>.*:\1:p')" debug_additional="$(printf "%s" "$output_additional" | sed -n 's:.*<name>\(.*\)</name>.*:\1:p')"
_debug 'Additional domains managed by Plesk server are:' _debug 'Additional domains managed by Plesk server are:'
_debug "$debug_additional" _debug "$debug_additional"
# Concate the two outputs together. # Concate the two outputs together.
output="$(printf "$output $NEWLINE $output_additional")" output="$(printf "%s" "$output $NEWLINE $output_additional")"
debug_output="$(printf "$output" | sed -n 's:.*<name>\(.*\)</name>.*:\1:p')" debug_output="$(printf "%s" "$output" | sed -n 's:.*<name>\(.*\)</name>.*:\1:p')"
_debug 'Domains (including additional) managed by Plesk server are:' _debug 'Domains (including additional) managed by Plesk server are:'
_debug "$debug_output" _debug "$debug_output"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment