Skip to content

Latest commit

 

History

History
98 lines (71 loc) · 2.79 KB

TESTING_lando.md

File metadata and controls

98 lines (71 loc) · 2.79 KB

Lando Drupal 10 base - php8.1, nginx, mariadb

This example exists primarily to test the following documentation:

Start up tests

Run the following commands to get up and running with this example.

# Should remove any previous runs and poweroff
lando --clear
lando destroy -y
lando poweroff

# Should start up our Lagoon Drupal 10 site successfully
lando start

Verification commands

Run the following commands to validate things are rolling as they should.

# Should be able to site install via Drush
lando drush si -y
lando drush cr -y
lando drush status | grep "Drupal bootstrap" | grep "Successful"

# Should have all the services we expect
docker ps --filter label=com.docker.compose.project=drupalnextbase | grep Up | grep drupalnextbase_nginx_1
docker ps --filter label=com.docker.compose.project=drupalnextbase | grep Up | grep drupalnextbase_mariadb_1
docker ps --filter label=com.docker.compose.project=drupalnextbase | grep Up | grep drupalnextbase_mailhog_1
docker ps --filter label=com.docker.compose.project=drupalnextbase | grep Up | grep drupalnextbase_php_1
docker ps --filter label=com.docker.compose.project=drupalnextbase | grep Up | grep drupalnextbase_cli_1
docker ps --filter label=com.docker.compose.project=drupalnextbase | grep Up | grep drupalnextbase_lagooncli_1

# Should ssh against the cli container by default
lando ssh -c "env | grep LAGOON=" | grep cli-drupal

# Should have the correct environment set
lando ssh -c "env" | grep LAGOON_ROUTE | grep drupalnext-base.lndo.site
lando ssh -c "env" | grep LAGOON_ENVIRONMENT_TYPE | grep development

# Should be running PHP 8.1
lando ssh -c "php -v" | grep "PHP 8.1"

# Should have composer
lando composer --version

# Should have php cli
lando php --version

# Should have drush
lando drush --version

# Should have npm
lando npm --version

# Should have node
lando node --version

# Should have yarn
lando yarn --version

# Should have lagoon cli
lando lagoon --version | grep lagoon

# Should have a running Drupal 10 site served by nginx on port 8080
lando ssh -s cli -c "curl -kL http://nginx:8080" | grep "Welcome to Drush Site-Install"

# Should be able to db-export and db-import the database
lando db-export test.sql
lando db-import test.sql.gz
rm test.sql*

# Should be able to show the drupal tables
lando mysql drupal -e "show tables;" | grep users

# Should be able to rebuild and persist the database
lando rebuild -y
lando mysql drupal -e "show tables;" | grep users

Destroy tests

Run the following commands to trash this app like nothing ever happened.

# Should be able to destroy our Drupal 10 site with success
lando destroy -y
lando poweroff