mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 18:13:32 -06:00
update README.md regarding running tests
[skip ci]
This commit is contained in:
parent
e672604835
commit
fae9eb546e
19
README.md
19
README.md
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user