test suites should also directly use the global logrus logger

This commit is contained in:
R. Aidan Campbell 2021-10-10 14:55:24 -07:00
commit 9ab16632de
No known key found for this signature in database
GPG key ID: 0985399E9CD6A99B
31 changed files with 39 additions and 72 deletions

View file

@ -19,7 +19,6 @@
package status_test
import (
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@ -34,7 +33,6 @@ type StatusStandardTestSuite struct {
suite.Suite
config *config.Config
db db.DB
log *logrus.Logger
typeConverter typeutils.TypeConverter
fromClientAPIChan chan messages.FromClientAPI

View file

@ -67,7 +67,7 @@ func (suite *UtilTestSuite) SetupSuite() {
func (suite *UtilTestSuite) SetupTest() {
suite.config = testrig.NewTestConfig()
suite.db = testrig.NewTestDB()
suite.log = testrig.NewTestLog()
testrig.InitTestLog()
suite.typeConverter = testrig.NewTestTypeConverter(suite.db)
suite.fromClientAPIChan = make(chan messages.FromClientAPI, 100)
suite.status = status.New(suite.db, suite.typeConverter, suite.config, suite.fromClientAPIChan)