Skip account_test when no db available
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Jan Bader 2022-02-23 22:12:09 +00:00
parent 5f746f5889
commit 7c694fb32c

View File

@ -2,6 +2,7 @@ package server
import ( import (
"encoding/json" "encoding/json"
"fmt"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"strings" "strings"
@ -22,7 +23,8 @@ func TestRegisterUser(t *testing.T) { //nolint:funlen
t.Parallel() t.Parallel()
database, err := postgres.Connect("pgtx", "example") database, err := postgres.Connect("pgtx", "example")
if err != nil { 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 return
} }