Skip to content

Commit cc72863

Browse files
committed
Properly format test running documentation example, and add suggestion for using a config.sh file. Fixes #487
1 parent 64e1605 commit cc72863

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,12 +869,15 @@ will have:
869869

870870
## Running unit tests
871871

872-
Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` and `MYSQL_PASSWORD`. 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`. E.g.
873873

874+
```
874875
mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test_db"
875876
mysql -u root -e "CREATE USER 'node_mysql_test'@'localhost' IDENTIFIED BY ''"
876877
mysql -u root -e "GRANT ALL ON node_mysql_test_db.* TO 'node_mysql_test'@'%'"
877-
export MYSQL_DATABASE=node_mysql_test_db && export MYSQL_USER=node_mysql_test && make test
878+
export MYSQL_DATABASE=node_mysql_test_db && export MYSQL_USER=node_mysql_test
879+
make test
880+
```
878881

879882
## Todo
880883

0 commit comments

Comments
 (0)