test(github): use require

This commit is contained in:
knqyf263
2019-11-10 15:50:23 +02:00
parent 51eb0dd362
commit 93c7b5e248

View File

@@ -13,6 +13,8 @@ import (
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/aquasecurity/trivy/pkg/log"
"golang.org/x/xerrors"
@@ -409,9 +411,8 @@ func TestClient_DownloadDB(t *testing.T) {
},
}
if err := log.InitLogger(false, true); err != nil {
panic(err)
}
err := log.InitLogger(false, true)
require.NoError(t, err, "Init logger failed")
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {