1- # Drupal 11 Example  
1+ # Drupal 11 with MySQL 8.4  Example  
22
3- This example exists primarily to test the following documentation against mysql  8.4:
3+ This example exists primarily to test the following documentation against MySQL  8.4:
44
55*  [ Drupal 11 Recipe] ( https://docs.lando.dev/plugins/drupal ) 
66
@@ -35,7 +35,7 @@ cat .lando.yml | grep "composer_version: 2-latest"
3535
3636#  Should be running mysql 8.4.x
3737cd  drupal11
38- lando mysql -V |  tee >( cat 2>&1 )   |  grep 8.4
38+ lando mysql -V |  tee >( cat 1>&2 )   |  grep ' 8.4. ' 
3939
4040#  Should return the drupal installation page by default
4141cd  drupal11
@@ -47,8 +47,8 @@ lando php -v | grep "PHP 8.3"
4747
4848#  Should be running apache 2.4 by default
4949cd  drupal11
50- lando exec  appserver -- apachectl -V |  grep 2.4
51- lando exec  appserver -- curl -IL localhost |  grep Server |  grep 2.4
50+ lando exec  appserver -- apachectl -V |  grep ' 2.4' 
51+ lando exec  appserver -- curl -IL localhost |  grep Server |  grep ' 2.4' 
5252
5353#  Should be running sqlite 3.45 by default
5454cd  drupal11
@@ -68,12 +68,12 @@ lando composer --version | cut -d " " -f 3 | head -n 1 | awk -v min=2.7.0 -F. '(
6868
6969#  Should use site-local drush if installed
7070cd  drupal11
71- lando composer require drush/drush
71+ lando composer require drush/drush --no-interaction 
7272lando exec  appserver -- which drush |  grep " /app/vendor/bin/drush" 
7373
7474#  Should be able to install drupal
7575cd  drupal11
76- lando drush si  --db-url=mysql://drupal11:drupal11@database/drupal11 -y
76+ lando drush site:install  --db-url=mysql://drupal11:drupal11@database/drupal11 -y
7777
7878#  Should be able to enable and access jsonapi
7979cd  drupal11
@@ -82,13 +82,37 @@ lando exec appserver -- curl localhost/jsonapi | grep "action--action"
8282
8383#  Should be able to dump the database with drush
8484cd  drupal11
85- lando drush sql-dump --result-file=drupal11.sql
86- lando mysql -udrupal11 -pdrupal11 drupal11 -e " SELECT COUNT(*) FROM users;"   |  grep 1 
85+ lando drush sql-dump --result-file=drupal11.sql --extra-dump= " --no-tablespaces " 
86+ lando mysql -udrupal11 -pdrupal11 drupal11 -e " SELECT COUNT(*) FROM users;"   |  grep -A 2 COUNT  |  tee  >( cat  1>&2 )   |  grep 2 
8787
88- #  Should be able to restore the database with drush
88+ #  Should be able to drop and  restore the database with drush
8989cd  drupal11
9090lando drush sql-drop -y
9191lando drush sql-cli <  drupal11.sql
92+ lando mysql -udrupal11 -pdrupal11 drupal11 -e " SELECT COUNT(*) FROM users;"   |  grep -A 2 COUNT |  tee >( cat 1>&2 )   |  grep 2
93+ 
94+ #  Should be able to export the database with Lando
95+ cd  drupal11
96+ rm -f drupal11.sql
97+ lando db-export drupal11.sql
98+ 
99+ #  Should be able to import the database with Lando
100+ cd  drupal11
101+ lando db-import drupal11.sql.gz
102+ lando mysql -udrupal11 -pdrupal11 drupal11 -e " SELECT COUNT(*) FROM users;"   |  grep -A 2 COUNT |  tee >( cat 1>&2 )   |  grep 2
103+ 
104+ #  Should be able to drop database tables
105+ cd  drupal11
106+ lando drush sql-drop -y
107+ 
108+ #  Should be able to pipe in file through appserver
109+ cd  drupal11
110+ lando exec  appserver -- ' zcat drupal11.sql.gz | mysql -h database -udrupal11 -pdrupal11 drupal11' 
111+ lando mysql -udrupal11 -pdrupal11 drupal11 -e " SELECT COUNT(*) FROM users;"   |  grep -A 2 COUNT |  tee >( cat 1>&2 )   |  grep 2
112+ 
113+ #  Should bootstrap Drupal successfully
114+ cd  drupal11
115+ lando drush status |  grep " Drupal bootstrap"   |  tee >( cat 1>&2 )   |  grep " Successful" 
92116``` 
93117
94118## Destroy tests  
0 commit comments