diff --git a/.github/workflows/pr-mariadb-tests.yml b/.github/workflows/pr-mariadb-tests.yml index a36060b..8a17ac2 100644 --- a/.github/workflows/pr-mariadb-tests.yml +++ b/.github/workflows/pr-mariadb-tests.yml @@ -34,6 +34,7 @@ jobs: - examples/11.2 - examples/11.3 - examples/custom + - examples/tooling steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/docs/config.md b/docs/config.md index 5b8ce6f..fd9baa1 100644 --- a/docs/config.md +++ b/docs/config.md @@ -5,9 +5,9 @@ description: Learn how to configure the Lando MariaDB service. # Configuration -Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/lando-service.html) to get a good handle on how the magicks work. +Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/services/lando.html) to get a good handle on how the magicks work. -Also note that options, in addition to the [build steps](https://docs.lando.dev/core/v3/lando-service.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/lando-service.html#overrides) that are available to every service, are shown below: +Also note that options, in addition to the [build steps](https://docs.lando.dev/core/v3/services/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/services/lando.html#overrides) that are available to every service, are shown below: ::: warning Be careful when switching database type, version or credentials! You should be careful switching database `type`, `version` or `creds`. diff --git a/docs/index.md b/docs/index.md index 3a633eb..18a761e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,7 +8,7 @@ next: ./config.html [MariaDB](https://mariadb.org/) is a very common database server which is *EXTREMELY* similar to MySQL but has a guarantee of being open source. -You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/lando-service.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3). +You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3). ```yaml services: @@ -27,7 +27,7 @@ services: * [10.5](https://hub.docker.com/r/bitnami/mariadb/tags?name=10.5.) * [10.4](https://hub.docker.com/r/bitnami/mariadb/tags?name=10.4.) * **[10.3](https://hub.docker.com/r/bitnami/mariadb/tags?name=10.3.)** **(default)** -* [custom](https://docs.lando.dev/core/v3/lando-service.html#overrides) +* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides) ## Legacy versions diff --git a/examples/tooling/.lando.yml b/examples/tooling/.lando.yml new file mode 100644 index 0000000..7e1d33f --- /dev/null +++ b/examples/tooling/.lando.yml @@ -0,0 +1,22 @@ +name: lando-mariadb-tooling +services: + database: + type: mariadb:11.3 +tooling: + 'db-export-test [file]': + service: :host + cmd: '/helpers/sql-export.sh' + user: 'root' + options: + host: + description: The database service to use + default: database + alias: + - h + stdout: + description: Dump database to stdout + +# This is important because it lets lando know to test against the plugin in this repo +# DO NOT REMOVE THIS! +plugins: + "@lando/mariadb": ../.. diff --git a/examples/tooling/README.md b/examples/tooling/README.md new file mode 100644 index 0000000..cc9b196 --- /dev/null +++ b/examples/tooling/README.md @@ -0,0 +1,38 @@ +MariaDB Tooling Example +======================= + +This example exists primarily to test the following documentation: + +* [MariaDB Service](https://docs.devwithlando.io/tutorials/mariadb.html) + +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 not see deprecation warning on db-export +lando db-export-test --stdout | grep -vz "Deprecated" +``` + +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 +```