From fb3447eaf3bef0420ab7d3262c3fcc6e1725829b Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Sun, 18 Jul 2021 23:24:09 -0400 Subject: [PATCH] Improve test coverage --- storage/storage_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/storage/storage_test.go b/storage/storage_test.go index 7655204b..b60d7cfe 100644 --- a/storage/storage_test.go +++ b/storage/storage_test.go @@ -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