diff --git a/.tests/.lib.sh b/.tests/.lib.sh index b8ee3d37..a2ad562c 100644 --- a/.tests/.lib.sh +++ b/.tests/.lib.sh @@ -60,6 +60,28 @@ runsu() { } +print_h1() { + _headline="${1}" + + _blue="\033[0;34m" + _reset="\033[0m" + printf "${_blue}%s${_reset}\n" "################################################################################" + printf "${_blue}%s${_reset}\n" "#" + printf "${_blue}%s %s${_reset}\n" "#" "${_headline}" + printf "${_blue}%s${_reset}\n" "#" + printf "${_blue}%s${_reset}\n" "################################################################################" +} + +print_h2() { + _headline="${1}" + + _blue="\033[0;34m" + _reset="\033[0m" + printf "${_blue}%s${_reset}\n" "############################################################" + printf "${_blue}%s %s${_reset}\n" "#" "${_headline}" + printf "${_blue}%s${_reset}\n" "############################################################" +} + wait_for() { _time="${1}" _debug="0" @@ -308,15 +330,8 @@ devilbox_start() { _new_php="$4" _new_head="$5" - # Print Headline - _blue="\033[0;34m" - _reset="\033[0m" - printf "${_blue}%s${_reset}\n" "################################################################################" - printf "${_blue}%s${_reset}\n" "#" - printf "${_blue}%s %s${_reset}\n" "#" "${_new_head}" - printf "${_blue}%s${_reset}\n" "#" - printf "${_blue}%s${_reset}\n" "################################################################################" + print_h1 "${_new_head}" # Adjust .env comment_all_dockers @@ -333,7 +348,7 @@ devilbox_start() { # Show log/info docker-compose logs - docker-compose ps + #docker-compose ps } devilbox_stop() { # Stop existing dockers @@ -358,6 +373,16 @@ devilbox_stop() { debilbox_test() { + + _ret=0 + _oks=3 + + ### + ### 1. Show Info + ### + print_h2 "1. Info" + + # Show wanted versions echo ".env settings" echo "------------------------------------------------------------" echo "HTTPD: $(get_enabled_version_httpd)" @@ -366,19 +391,60 @@ debilbox_test() { echo "PgSQL: $(get_enabled_version_postgres)" echo + # Get actual versions echo "http://localhost settings" echo "------------------------------------------------------------" curl -q localhost 2>/dev/null | grep -E '