From 8dc5fef8cfe7649909599c0b6af6ed1314ef8e5f Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Thu, 17 Oct 2024 20:06:04 -0400 Subject: [PATCH] fix and improve tests --- CHANGELOG.md | 2 +- examples/lemp-custom/.lando.yml | 1 + examples/lemp-custom/README.md | 4 ++++ examples/lemp-defaults/.lando.yml | 6 ++++++ examples/lemp-defaults/README.md | 10 +++++----- examples/lemp-init/config.lando.yml | 5 +++++ examples/lemp-mariadb-mysql/README.md | 4 ++-- examples/lemp-mariadb/README.md | 4 ++-- examples/lemp-mysql8/README.md | 4 ++-- 9 files changed, 28 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed3841b..776e19a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) - * Updated lando/php to v1.4.0. +* Updated to [@lando/php@1.4.0](https://github.com/lando/php/releases/tag/v1.4.0) ## v1.5.0 - [September 30, 2024](https://github.com/lando/lemp/releases/tag/v1.5.0) diff --git a/examples/lemp-custom/.lando.yml b/examples/lemp-custom/.lando.yml index 9544bfa..0f37cb0 100644 --- a/examples/lemp-custom/.lando.yml +++ b/examples/lemp-custom/.lando.yml @@ -10,6 +10,7 @@ config: webroot: bob database: mysql:5.7 xdebug: true + ssl: true config: database: config/mysql.cnf php: config/php.ini diff --git a/examples/lemp-custom/README.md b/examples/lemp-custom/README.md index 58ee680..db05184 100644 --- a/examples/lemp-custom/README.md +++ b/examples/lemp-custom/README.md @@ -45,6 +45,10 @@ lando exec appserver -- curl -L appserver_nginx/info.php | grep memory_limit | g lando php -i | grep memory_limit | grep -e "-1" lando exec appserver -- php -i | grep "memory_limit" | grep -e "-1" +# Should serve and be accessible over ssl if specified +lando exec appserver_nginx -- curl https://localhost +lando exec appserver -- curl https://appserver_nginx + # Should be able to connect to the database with the default creds lando mysql lemp -e quit diff --git a/examples/lemp-defaults/.lando.yml b/examples/lemp-defaults/.lando.yml index 9025580..2a73212 100644 --- a/examples/lemp-defaults/.lando.yml +++ b/examples/lemp-defaults/.lando.yml @@ -1,6 +1,12 @@ name: lemp-defaults recipe: lemp +services: + curl: + api: 4 + image: curlimages/curl + command: sleep infinity + # do not remove this plugins: "@lando/lemp": ../.. diff --git a/examples/lemp-defaults/README.md b/examples/lemp-defaults/README.md index 4f73d91..990901c 100644 --- a/examples/lemp-defaults/README.md +++ b/examples/lemp-defaults/README.md @@ -20,13 +20,13 @@ Run the following commands to validate things are rolling as they should. ```bash # Should serve from app root by default -lando exec appserver_nginx -- curl -L localhost | grep "DEFAULTS" +lando exec curl -- curl -L localhost | grep "DEFAULTS" # Should use 8.3 as the default php version lando php -v | grep "PHP 8.3" -# Should be running nginx 1.17 by default -lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.17 +# Should be running nginx 1.27 by default +lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.27 # Should be running mysql 5.7 by default lando mysql -V | grep 5.7 @@ -35,7 +35,7 @@ lando mysql -V | grep 5.7 lando exec appserver -- env | grep "COMPOSER_MEMORY_LIMIT=-1" # Should have a 1G php mem limit on appserver -lando exec appserver_nginx -- curl http://localhost/info.php | grep "memory_limit" | grep "1G" +lando exec curl -- curl http://localhost/info.php | grep "memory_limit" | grep "1G" # Should have unlimited memory for php for CLI opts lando php -i | grep memory_limit | grep -e "-1" @@ -49,7 +49,7 @@ lando mysql lemp -e quit # Should use the correct default config files lando exec appserver -- cat /usr/local/etc/php/conf.d/zzz-lando-my-custom.ini | grep "; LANDOLEMPPHPINI" -lando exec appserver_nginx -- curl -L http://localhost/info.php | grep max_execution_time | grep 91 +lando exec curl -- curl -L http://localhost/info.php | grep max_execution_time | grep 91 lando exec database -- cat /opt/bitnami/mysql/conf/my_custom.cnf | grep "LANDOLEMPMYSQLCNF" lando mysql -u root -e "show variables;" | grep innodb_lock_wait_timeout | grep 121 diff --git a/examples/lemp-init/config.lando.yml b/examples/lemp-init/config.lando.yml index e4b080d..9971fc2 100644 --- a/examples/lemp-init/config.lando.yml +++ b/examples/lemp-init/config.lando.yml @@ -4,3 +4,8 @@ config: webroot: . php: 5.6 database: mariadb:10.3 +services: + curl: + api: 4 + image: curlimages/curl + command: sleep infinity diff --git a/examples/lemp-mariadb-mysql/README.md b/examples/lemp-mariadb-mysql/README.md index 0e3d3c6..cc82c75 100644 --- a/examples/lemp-mariadb-mysql/README.md +++ b/examples/lemp-mariadb-mysql/README.md @@ -34,9 +34,9 @@ Run the following commands to validate things are rolling as they should. cd mariadb lando php -v | grep "PHP 8.3" -# Should be running nginx 1.17 by default +# Should be running nginx 1.27 by default cd mariadb -lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.17 +lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.27 # Should be running mariadb 10.3.x by default cd mariadb diff --git a/examples/lemp-mariadb/README.md b/examples/lemp-mariadb/README.md index 1500408..f35d5f3 100644 --- a/examples/lemp-mariadb/README.md +++ b/examples/lemp-mariadb/README.md @@ -32,9 +32,9 @@ Run the following commands to validate things are rolling as they should. cd mariadb lando php -v | grep "PHP 8.3" -# Should be running nginx 1.17 by default +# Should be running nginx 1.27 by default cd mariadb -lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.17 +lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.27 # Should be running mariadb 11.3.x by default cd mariadb diff --git a/examples/lemp-mysql8/README.md b/examples/lemp-mysql8/README.md index d4dd044..60ff089 100644 --- a/examples/lemp-mysql8/README.md +++ b/examples/lemp-mysql8/README.md @@ -32,9 +32,9 @@ Run the following commands to validate things are rolling as they should. cd mysql8 lando php -v | grep "PHP 8.3" -# Should be running nginx 1.17 by default +# Should be running nginx 1.27 by default cd mysql8 -lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.17 +lando exec appserver_nginx -- nginx -v 2>&1 | grep 1.27 # Should be running mysql 8.0.x by default cd mysql8