From bc9b3544a3c02025b0c9c3c68c315d98f225aba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Mon, 17 Mar 2025 08:27:44 +0100 Subject: [PATCH 1/3] CONTRIBUTING: Add note about testing locally --- CONTRIBUTING.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f56ca5b38..2698f0717 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,3 +15,24 @@ ## Asking for help - Don't be afraid to ask for help in an issue or PR. + +## Testing + +Testing is done with GitHub actions. + + +If you want to run test locally you can use the following flags: + +``` + -db string + -host string + -pass string + -port string + -user string +``` + +Example: +``` +$ cd client +$ go test -args -db test2 -port 3307 +``` From a88512b914f974ba432f37d15be75f2e1b702b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Mon, 17 Mar 2025 08:33:06 +0100 Subject: [PATCH 2/3] add podman --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2698f0717..eb42607e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,3 +36,18 @@ Example: $ cd client $ go test -args -db test2 -port 3307 ``` + +Testing locally with Docker or Podman can be done like this: +``` +podman run \ +--rm \ +--env MYSQL_ALLOW_EMPTY_PASSWORD=1 \ +--env MYSQL_ROOT_HOST='%' \ +-p3307:3306 \ +-it \ +container-registry.oracle.com/mysql/community-server:8.0 \ +--gtid-mode=ON \ +--enforce-gtid-consistency=ON +``` + +Substitude `podman` with `docker` if you're using docker. This uses `--rm` to remove the container when it stops. It also enabled GTID by passing options to `mysqld`. From 28ca6d1be38d9973faf7d2fc61d4682b580dae6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 18 Mar 2025 07:26:25 +0100 Subject: [PATCH 3/3] Update CONTRIBUTING.md Co-authored-by: lance6716 --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb42607e0..3442da379 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,6 @@ Testing is done with GitHub actions. - If you want to run test locally you can use the following flags: ```