mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Docs: integration tests for using sqllite (#49455)
* Update developer-guide.md * prettier formatting
This commit is contained in:
@@ -136,17 +136,23 @@ Running the backend tests on Windows currently needs some tweaking, so use the b
|
|||||||
go run build.go test
|
go run build.go test
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run PostgreSQL and MySQL integration tests
|
### Run SQLLite, PostgreSQL and MySQL integration tests
|
||||||
|
|
||||||
|
By default grafana runs SQLite, to run test with SQLite
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go test -covermode=atomic -tags=integration ./pkg/...
|
||||||
|
```
|
||||||
|
|
||||||
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
|
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
|
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
|
||||||
```
|
```
|
||||||
|
|
||||||
and/or
|
and/or
|
||||||
|
|
||||||
```
|
```bash
|
||||||
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
|
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user