REL-0.9 Clean up tests

This commit is contained in:
cytopia 2017-05-12 08:38:46 +02:00
parent f8606aaa25
commit 21ce41e6f3
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2

View File

@ -9,7 +9,7 @@
###
### Validate arguments
###
if [ "${#}" != "5" ]; then
if [ "${#}" != "3" ]; then
echo "Error: Invalid number of arguments"
exit 1
fi
@ -22,11 +22,9 @@ fi
###
### Get arguments
###
DVL_PATH="$( echo "${1}"| sed 's/\/*$//' )" # remove last slash(es): /
DVL_SRV1="${2}" # Server 1
DVL_VER1="${3}" # Version 1
DVL_SRV2="${4}" # Server 2
DVL_VER2="${5}" # Version 2
DEVILBOX_PATH="$( echo "${1}"| sed 's/\/*$//' )" # remove last slash(es): /
DEVILBOX_SERV="${2}" # Server
DEVILBOX_VERS="${3}" # Version
@ -39,7 +37,7 @@ DVL_VER2="${5}" # Version 2
###
### Source library
###
. "${DVL_PATH}/.tests/.lib.sh" "${DVL_PATH}"
. "${DEVILBOX_PATH}/.tests/.lib.sh" "${DEVILBOX_PATH}"
###
### Reset .env file
@ -55,8 +53,8 @@ set_debug_enable
### Alter host ports
###
set_host_port_httpd "80"
set_host_port_mysql "33060"
set_host_port_pgsql "54320"
set_host_port_mysql "3306"
set_host_port_pgsql "5432"
@ -66,7 +64,38 @@ set_host_port_pgsql "54320"
#
################################################################################
devilbox_start "${DVL_SRV1}" "${DVL_VER1}" "${DVL_SRV2}" "${DVL_VER2}"
###
### Docker default versions to use
###
_httpd="nginx-stable"
_mysql="mariadb-10.1"
_pgsql="9.6"
_php="php-fpm-7.0"
###
### Set specific version
###
if [ "${DEVILBOX_SERV}" = "httpd" ]; then
_httpd="${DEVILBOX_VERS}"
_head="HTTPD: ${DEVILBOX_VERS}"
elif [ "${DEVILBOX_SERV}" = "mysql" ]; then
_mysql="${DEVILBOX_VERS}"
_head="MYSQL: ${DEVILBOX_VERS}"
elif [ "${DEVILBOX_SERV}" = "pgsql" ]; then
_pgsql="${DEVILBOX_VERS}"
_head="PGSQL: ${DEVILBOX_VERS}"
elif [ "${DEVILBOX_SERV}" = "php" ]; then
_php="${DEVILBOX_VERS}"
_head="PHP: ${DEVILBOX_VERS}"
fi
###
### Go
###
devilbox_start "${_httpd}" "${_mysql}" "${_pgsql}" "${_php}" "${_head}"
devilbox_show
debilbox_test
devilbox_stop