update README.md regarding running tests

[skip ci]
This commit is contained in:
Marcus Efraimsson
2018-02-09 13:31:37 +01:00
committed by GitHub
parent e672604835
commit fae9eb546e

View File

@@ -80,8 +80,11 @@ In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode =
### Running tests
- You can run backend Golang tests using "go test ./pkg/...".
- Execute all frontend tests with "npm run test"
#### Frontend
Execute all frontend tests
```bash
$ npm run test
```
Writing & watching frontend tests (we have two test runners)
@@ -92,6 +95,18 @@ Writing & watching frontend tests (we have two test runners)
- Start watcher: `npm run karma`
- Karma+Mocha runs all files that end with the name "_specs.ts".
#### Backend
```bash
# Run Golang tests using sqlite3 as database (default)
$ go test ./pkg/...
# Run Golang tests using mysql as database - convenient to use /docker/block/mysql_tests
$ GRAFANA_TEST_DB=mysql go test ./pkg/...
# Run Golang tests using postgres as database - convenient to use /docker/blocks/postgres_tests
$ GRAFANA_TEST_DB=postgres go test ./pkg/...
```
## Contribute
If you have any idea for an improvement or found a bug, do not hesitate to open an issue.