acceptance/repository-mysql/README.md
Acceptance tests for @loopback/repository + loopback-connector-mysql.
If you have a local MySQL instance listening on localhost and the default
port, with a root user and an empty password, use the following command:
npm test
If you have a local or remote MySQL instance and would like to use that to run the test suite, use the following command:
Linux & MacOS
MYSQL_HOST=<HOST> MYSQL_PORT=<PORT> MYSQL_USER=<USER> MYSQL_PASSWORD=<PASSWORD> MYSQL_DATABASE=<DATABASE> npm test
Windows
SET MYSQL_HOST=<HOST>
SET MYSQL_PORT=<PORT>
SET MYSQL_USER=<USER>
SET MYSQL_PASSWORD=<PASSWORD>
SET MYSQL_DATABASE=<DATABASE>
npm test
If you do not have a local MySQL instance, you can also run the test suite with very minimal requirements.
Assuming you have Docker installed, run the following script which would spawn a MySQL instance on your local:
source setup.sh <HOST> <PORT> <USER> <PASSWORD> <DATABASE>
Where <HOST>, <PORT>, <USER>, <PASSWORD> and <DATABASE> are optional
parameters. The default values are localhost, 3306, root, pass and
testdb respectively.
Run the test:
npm test
See all contributors.
MIT