diff --git a/.github/workflows/pr-backdrop-tests.yml b/.github/workflows/pr-backdrop-tests.yml index ca0ed52..24ed37c 100644 --- a/.github/workflows/pr-backdrop-tests.yml +++ b/.github/workflows/pr-backdrop-tests.yml @@ -21,6 +21,7 @@ jobs: - examples/backdrop-init - examples/backdrop-mariadb - examples/backdrop-mysql8 + - examples/backdrop-mysql-client - examples/backdrop-nginx lando-version: - 3-edge diff --git a/examples/backdrop-mysql-client/.lando.yml b/examples/backdrop-mysql-client/.lando.yml new file mode 100644 index 0000000..ea5428d --- /dev/null +++ b/examples/backdrop-mysql-client/.lando.yml @@ -0,0 +1,9 @@ +name: backdrop-mysql-client +recipe: backdrop +config: + php: '8.4' + database: mysql:8.0 + +# do not remove this +plugins: + "@lando/backdrop": ../.. diff --git a/examples/backdrop-mysql-client/README.md b/examples/backdrop-mysql-client/README.md new file mode 100644 index 0000000..e00d0fb --- /dev/null +++ b/examples/backdrop-mysql-client/README.md @@ -0,0 +1,57 @@ +# Backdrop MySQL Client Compatibility Example + +This example tests that the backdrop recipe with MySQL correctly auto-detects +and installs the native MySQL client, avoiding SSL/TLS errors and MariaDB dump +format issues when using `bee db-export`. + +See: https://github.com/lando/lando/issues/3833 + +## Start up tests + +Run the following commands to get up and running with this example. + +```bash +# Should start up successfully +lando poweroff +lando start +``` + +## Verification commands + +Run the following commands to validate things are rolling as they should. + +```bash +# Should auto-detect MySQL and install the MySQL client (not MariaDB) +lando exec appserver -- mysql --version | grep -qiv "MariaDB" +``` + +```bash +# Should be able to connect to MySQL without SSL errors +lando mysql backdrop -e "SELECT 1" +``` + +```bash +# Should be able to export with bee without SSL errors +lando bee db-export --file=/tmp/bee-export.sql +``` + +```bash +# Exported SQL should use MySQL dump format (not MariaDB) +lando exec appserver -- cat /tmp/bee-export.sql | grep -qi "MariaDB dump" || echo $? | grep 1 +``` + +```bash +# Should be able to export with db-export without SSL errors +lando db-export --stdout > /tmp/lando-export.sql +cat /tmp/lando-export.sql | grep -i "Dump" | grep -qi "MariaDB" || echo $? | grep 1 +``` + +## Destroy tests + +Run the following commands to trash this app like nothing ever happened. + +```bash +# Should be destroyed with success +lando destroy -y +lando poweroff +```