mirror of https://github.com/statping/statping
Created Testing (markdown)
parent
96fced1ca3
commit
05d8c0d738
|
@ -0,0 +1,20 @@
|
||||||
|
If you want to test your updates with the current golang testing units, you can follow the guide below to run a full test process.
|
||||||
|
|
||||||
|
## Create Docker Databases
|
||||||
|
The easiest way to run the tests on all 3 databases is by starting temporary databases with Docker.
|
||||||
|
|
||||||
|
```go
|
||||||
|
docker run -it -d -p 3306:3306 mysql
|
||||||
|
```
|
||||||
|
|
||||||
|
```go
|
||||||
|
docker run -it -d -p 5432:5432 postgres
|
||||||
|
```
|
||||||
|
|
||||||
|
Once you have MySQL and Postgres running, you can begin the testing. SQLite database will create a `statup.db` file and will delete after testing.
|
||||||
|
|
||||||
|
## Run Tests
|
||||||
|
|
||||||
|
```go
|
||||||
|
go test -v
|
||||||
|
```
|
Loading…
Reference in New Issue