Skip to content

Commit 567aa59

Browse files
dveedenlance6716
andauthored
CONTRIBUTING: Add note about testing locally (#1014)
* CONTRIBUTING: Add note about testing locally * add podman * Update CONTRIBUTING.md Co-authored-by: lance6716 <[email protected]> --------- Co-authored-by: lance6716 <[email protected]>
1 parent 8458ff6 commit 567aa59

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,38 @@
1515
## Asking for help
1616

1717
- Don't be afraid to ask for help in an issue or PR.
18+
19+
## Testing
20+
21+
Testing is done with GitHub actions.
22+
23+
If you want to run test locally you can use the following flags:
24+
25+
```
26+
-db string
27+
-host string
28+
-pass string
29+
-port string
30+
-user string
31+
```
32+
33+
Example:
34+
```
35+
$ cd client
36+
$ go test -args -db test2 -port 3307
37+
```
38+
39+
Testing locally with Docker or Podman can be done like this:
40+
```
41+
podman run \
42+
--rm \
43+
--env MYSQL_ALLOW_EMPTY_PASSWORD=1 \
44+
--env MYSQL_ROOT_HOST='%' \
45+
-p3307:3306 \
46+
-it \
47+
container-registry.oracle.com/mysql/community-server:8.0 \
48+
--gtid-mode=ON \
49+
--enforce-gtid-consistency=ON
50+
```
51+
52+
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`.

0 commit comments

Comments
 (0)