Improve test coverage

This commit is contained in:
TwinProduction 2021-07-18 23:24:09 -04:00
parent 46cf616a57
commit fb3447eaf3

View File

@ -1,13 +1,19 @@
package storage
import (
"fmt"
"testing"
"time"
"github.com/TwinProduction/gatus/storage/store/sqlite"
)
func TestGet(t *testing.T) {
store := Get()
if store == nil {
t.Error("store should've been automatically initialized")
}
}
func TestInitialize(t *testing.T) {
type Scenario struct {
Name string
@ -62,7 +68,7 @@ func TestInitialize(t *testing.T) {
t.Error("ctx shouldn't have been nil")
}
if provider == nil {
fmt.Println("wtf?")
t.Fatal("provider shouldn't have been nit")
}
provider.Close()
// Try to initialize it again