[v9.0.x] Docs: integration tests for using sqllite (#49784)
* Docs: integration tests for using sqllite (#49455)
* Update developer-guide.md
* prettier formatting
(cherry picked from commit f5d25c91f6)
* Update contribute/developer-guide.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Update contribute/developer-guide.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
This commit is contained in:
co-authored by
brendamuir
Eric Leijonmarck
parent
8a4eed5fb6
commit
d71e30a692
@@ -136,17 +136,23 @@ Running the backend tests on Windows currently needs some tweaking, so use the b
|
||||
go run build.go test
|
||||
```
|
||||
|
||||
### Run PostgreSQL and MySQL integration tests
|
||||
### Run SQLLite, PostgreSQL and MySQL integration tests
|
||||
|
||||
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:
|
||||
By default, Grafana runs SQLite to run tests with SQLite.
|
||||
|
||||
```bash
|
||||
go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
To run PostgreSQL and MySQL integration tests locally, 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/...
|
||||
```
|
||||
|
||||
and/or
|
||||
|
||||
```
|
||||
```bash
|
||||
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user