Skip to content

Commit a1f3db0

Browse files
committed
improve instructions for running tests
1 parent cc72863 commit a1f3db0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Readme.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -869,14 +869,13 @@ will have:
869869

870870
## Running unit tests
871871

872-
Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` and `MYSQL_PASSWORD`. (You may want to put these in a `config.sh` file and source it when you run the tests). Then run `make test`. E.g.
872+
Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` and `MYSQL_PASSWORD`. (You may want to put these in a `config.sh` file and source it when you run the tests). Then run `make test`.
873+
874+
For example, if you have an installation of mysql running on localhost:3306 and no password set for the `root` user, run:
873875

874876
```
875-
mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test_db"
876-
mysql -u root -e "CREATE USER 'node_mysql_test'@'localhost' IDENTIFIED BY ''"
877-
mysql -u root -e "GRANT ALL ON node_mysql_test_db.* TO 'node_mysql_test'@'%'"
878-
export MYSQL_DATABASE=node_mysql_test_db && export MYSQL_USER=node_mysql_test
879-
make test
877+
mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test"
878+
MYSQL_HOST=localhost && MYSQL_PORT=3306 && MYSQL_DATABASE=node_mysql_test && MYSQL_USER=root && MYSQL_PASSWORD= && make test
880879
```
881880

882881
## Todo

0 commit comments

Comments
 (0)