diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f56ca5b38..3442da379 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,3 +15,38 @@ ## 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 +``` + +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`.