From 6481be32d8d27a86510fd287e69e35376829e3ac Mon Sep 17 00:00:00 2001 From: Mitchell Krog Date: Mon, 24 Jun 2019 09:58:32 +0200 Subject: [PATCH] Improve Test Results Commenting and Coloring --- .dev-tools/test-blocker.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.dev-tools/test-blocker.sh b/.dev-tools/test-blocker.sh index fde193eb4..05186cf98 100755 --- a/.dev-tools/test-blocker.sh +++ b/.dev-tools/test-blocker.sh @@ -278,9 +278,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i '(52)'; then - echo "${bold}${green}PASSED - ${red}${line} was ${bold}BLOCKED" + echo "${bold}${green}PASSED - ${red}${line} was ${bold}${red}BLOCKED" else - echo "${bold}${red}FAILED - ${red}${line} was ${bold}NOT BLOCKED" + echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}NOT BLOCKED" fi done IFS="" @@ -297,9 +297,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then - echo "${bold}${green}PASSED - ${green}${line} was ${bold}ALLOWED" + echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED" else - echo "${bold}${red}FAILED - ${red}${line} was ${bold}BLOCKED" + echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}BLOCKED" fi done IFS="" @@ -317,9 +317,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then - echo "${bold}${green}PASSED - ${green}${line} was ${bold}ALLOWED" + echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED" else - echo "${bold}${red}FAILED - ${red}${line} was ${bold}BLOCKED" + echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}BLOCKED" fi done IFS="" @@ -336,9 +336,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then - echo "${bold}${green}PASSED - ${green}${line} was ${bold}ALLOWED" + echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED" else - echo "${bold}${green}FAILED - ${red}${line} was ${bold}BLOCKED" + echo "${bold}${green}FAILED - ${red}${line} was ${bold}${red}BLOCKED" fi done IFS="" @@ -356,9 +356,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -I http://localhost:9000 -e "http://${line}" 2>&1 | grep -i '(52)'; then - echo "${bold}${green}PASSED - ${red}${line} was ${bold}BLOCKED" + echo "${bold}${green}PASSED - ${red}${line} was ${bold}${red}BLOCKED" else - echo "${bold}${red}FAILED - ${red}${line} was NOT ${bold}BLOCKED" + echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}NOT BLOCKED" fi done IFS="" @@ -374,9 +374,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then - echo "${bold}${green}PASSED - ${green}${line} was ${bold}ALLOWED" + echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED" else - echo "${bold}${green}FAILED - ${red}${line} was ${bold}BLOCKED" + echo "${bold}${green}FAILED - ${red}${line} was ${bold}${red}BLOCKED" fi done IFS=""