Simplify tests

This commit is contained in:
cytopia 2019-11-23 00:02:17 +01:00
parent 41493bc514
commit c8de832210
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
3 changed files with 19 additions and 30 deletions

View File

@ -2,8 +2,6 @@ ifneq (,)
.error This Makefile requires GNU Make.
endif
SHELL = /bin/sh
# -------------------------------------------------------------------------------------------------
# Misc Targets
@ -71,7 +69,7 @@ logs:
# -------------------------------------------------------------------------------------------------
###
###
### PHP Modules
###
test-smoke-modules:
$(PWD)/tests/modules-curl-vhosts.sh "modules"
@ -82,14 +80,14 @@ test-smoke-modules:
###
###
### Configuration
###
test-smoke-config:
$(PWD)/tests/config-xdebug.sh
###
###
### Intranet
###
test-smoke-intranet:
$(PWD)/tests/intranet-homepage.sh
@ -100,7 +98,7 @@ test-smoke-intranet:
###
###
### Intranet Vendors
###
test-smoke-vendors:
$(PWD)/tests/vendor-adminer-mysql.sh
@ -112,7 +110,7 @@ test-smoke-vendors:
###
###
### Virtual Host
###
test-smoke-vhosts:
$(PWD)/tests/vhost-directory_index.sh
@ -121,14 +119,14 @@ test-smoke-vhosts:
###
###
### Reverse Proxy
###
test-smoke-rproxies:
$(PWD)/tests/rproxy-javascript.sh
###
###
### SSL
###
test-smoke-ssl:
$(PWD)/tests/ssl-intranet.sh
@ -136,21 +134,21 @@ test-smoke-ssl:
###
###
### Bind
###
test-smoke-bind:
@echo noop
###
###
### Autostart
###
test-smoke-autostart:
$(PWD)/tests/autostart-examples.sh
###
###
### Frameworks
###
test-smoke-framework-cakephp:
$(PWD)/tests/framework-cakephp.sh

View File

@ -55,10 +55,14 @@ PROJECT_NAME="this-is-my-grepable-project-name"
# Setup Wordpress project
run "docker-compose exec --user devilbox -T php bash -c 'rm -rf /shared/httpd/${VHOST}'" "${RETRIES}" "${DVLBOX_PATH}"
run "docker-compose exec --user devilbox -T php bash -c 'mkdir -p /shared/httpd/${VHOST}'" "${RETRIES}" "${DVLBOX_PATH}"
run "docker-compose exec --user devilbox -T php bash -c 'git clone https://github.com/WordPress/WordPress /shared/httpd/${VHOST}/wordpress'" "${RETRIES}" "${DVLBOX_PATH}"
run "docker-compose exec --user devilbox -T php bash -c 'ln -sf wordpress /shared/httpd/${VHOST}/htdocs'" "${RETRIES}" "${DVLBOX_PATH}"
run "docker-compose exec --user devilbox -T php bash -c ' \
rm -rf /shared/httpd/${VHOST} \
&& mkdir -p /shared/httpd/${VHOST} \
&& git clone https://github.com/WordPress/WordPress /shared/httpd/${VHOST}/wordpress \
&& ln -sf wordpress /shared/httpd/${VHOST}/htdocs'" \
"${RETRIES}" "${DVLBOX_PATH}"
# Setup Database
run "docker-compose exec --user devilbox -T php mysql -u root -h mysql --password=\"${MYSQL_ROOT_PASSWORD}\" -e \"DROP DATABASE IF EXISTS ${DB_NAME}; CREATE DATABASE ${DB_NAME};\"" "${RETRIES}" "${DVLBOX_PATH}"
# Configure Wordpress database settings
@ -105,3 +109,4 @@ fi
# Test Wordpress
run "docker-compose exec --user devilbox -T php curl -sS --fail -L 'http://${VHOST}.${TLD_SUFFIX}:${HOST_PORT_HTTPD}/' | grep '${PROJECT_NAME}' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}"
run " curl -sS --fail -L --header 'host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/' | grep '${PROJECT_NAME}' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}"

View File

@ -293,20 +293,6 @@ script:
make linkcheck2;
elif [ "${S1}" = "UPDATE" ]; then
./update-docker.sh "${V1}";
elif [ "${S1}" = "DOCKER" ]; then
cd .tests/;
make start;
make test-smoke-modules;
make test-smoke-config;
make test-smoke-intranet;
make test-smoke-vendors;
make test-smoke-vhosts;
make test-smoke-rproxies;
make test-smoke-ssl;
make test-smoke-bind;
make test-smoke-autostart;
make test-smoke-framework-cakephp;
make test-smoke-framework-drupal;
else
cd .tests/;
make start;