Skip to content

Commit

Permalink
fix and improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Oct 18, 2024
1 parent 67ad2c8 commit 8dc5fef
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
1 change: 1 addition & 0 deletions examples/lemp-custom/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config:
webroot: bob
database: mysql:5.7
xdebug: true
ssl: true
config:
database: config/mysql.cnf
php: config/php.ini
Expand Down
4 changes: 4 additions & 0 deletions examples/lemp-custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions examples/lemp-defaults/.lando.yml
Original file line number Diff line number Diff line change
@@ -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": ../..
10 changes: 5 additions & 5 deletions examples/lemp-defaults/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions examples/lemp-init/config.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ config:
webroot: .
php: 5.6
database: mariadb:10.3
services:
curl:
api: 4
image: curlimages/curl
command: sleep infinity
4 changes: 2 additions & 2 deletions examples/lemp-mariadb-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/lemp-mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/lemp-mysql8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8dc5fef

Please sign in to comment.