From 7c694fb32c5eebe944053c7a867dcd61d3f01121 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 23 Feb 2022 22:12:09 +0000 Subject: [PATCH] Skip account_test when no db available --- server/account_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/account_test.go b/server/account_test.go index fe79cba..1af33c1 100644 --- a/server/account_test.go +++ b/server/account_test.go @@ -2,6 +2,7 @@ package server import ( "encoding/json" + "fmt" "net/http" "net/http/httptest" "strings" @@ -22,7 +23,8 @@ func TestRegisterUser(t *testing.T) { //nolint:funlen t.Parallel() database, err := postgres.Connect("pgtx", "example") if err != nil { - t.Errorf("could not connect to db: %s", err) + fmt.Printf("could not connect to db: %s\n", err) + t.Skip() return }