Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for mysqldump deprecation #54

Merged
merged 7 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-mariadb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- examples/11.2
- examples/11.3
- examples/custom
- examples/tooling
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
22 changes: 22 additions & 0 deletions examples/tooling/.lando.yml
Original file line number Diff line number Diff line change
@@ -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": ../..
38 changes: 38 additions & 0 deletions examples/tooling/README.md
Original file line number Diff line number Diff line change
@@ -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
```
Loading