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

CONTRIBUTING: Add note about testing locally #1014

Merged
merged 3 commits into from
Mar 18, 2025
Merged
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
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Loading