Fix typo [CI SKIP]

fix/size
Clément FRÉVILLE 2 years ago
parent b9c63974a9
commit 4f200ee5b6

@ -2,7 +2,7 @@
set -eu set -eu
declare -g EXCEPTED_DOC_BASE_PATH='/usr/share/nginx/html/octocat/hello-world' declare -g EXPECTED_DOC_BASE_PATH='/usr/share/nginx/html/octocat/hello-world'
declare -g VERBOSE='false' declare -g VERBOSE='false'
root_dir=$(readlink -f $(dirname $(realpath "$0"))/..) root_dir=$(readlink -f $(dirname $(realpath "$0"))/..)
@ -51,7 +51,7 @@ cleanup() {
assert_file_exists() { assert_file_exists() {
# Assert that the given file exists in the codefirst-nginx volume. # Assert that the given file exists in the codefirst-nginx volume.
if check_on_deployed test -f "$EXCEPTED_DOC_BASE_PATH/$1"; then if check_on_deployed test -f "$EXPECTED_DOC_BASE_PATH/$1"; then
echo -e "$1 exists: \e[32mOK\e[0m" echo -e "$1 exists: \e[32mOK\e[0m"
else else
echo -e "$1 does not exist: \e[31mFAILED\e[0m" echo -e "$1 does not exist: \e[31mFAILED\e[0m"
@ -63,12 +63,12 @@ assert_file_exists() {
assert_file_contains() { assert_file_contains() {
# Assert that the given file contains the given string. # Assert that the given file contains the given string.
if check_on_deployed grep -q $2 "$EXCEPTED_DOC_BASE_PATH/$1"; then if check_on_deployed grep -q $2 "$EXPECTED_DOC_BASE_PATH/$1"; then
echo -e "$1 exists and matches content: \e[32mOK\e[0m" echo -e "$1 exists and matches content: \e[32mOK\e[0m"
elif check_on_deployed test -f "$EXCEPTED_DOC_BASE_PATH/$1"; then elif check_on_deployed test -f "$EXPECTED_DOC_BASE_PATH/$1"; then
echo -e "$1 exists but does not match content: \e[31mFAILED\e[0m" echo -e "$1 exists but does not match content: \e[31mFAILED\e[0m"
if [[ "$VERBOSE" == 'true' ]]; then if [[ "$VERBOSE" == 'true' ]]; then
check_on_deployed cat "$EXCEPTED_DOC_BASE_PATH/$1" check_on_deployed cat "$EXPECTED_DOC_BASE_PATH/$1"
fi fi
else else
echo -e "$1 does not exist: \e[31mFAILED\e[0m" echo -e "$1 does not exist: \e[31mFAILED\e[0m"

Loading…
Cancel
Save