summaryrefslogtreecommitdiff
path: root/internal/db/bundb/bundb_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/bundb_test.go')
-rw-r--r--internal/db/bundb/bundb_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/db/bundb/bundb_test.go b/internal/db/bundb/bundb_test.go
index faa67456d..3fa74530d 100644
--- a/internal/db/bundb/bundb_test.go
+++ b/internal/db/bundb/bundb_test.go
@@ -24,6 +24,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/testrig"
)
type BunDBStandardTestSuite struct {
@@ -44,3 +45,27 @@ type BunDBStandardTestSuite struct {
testTags map[string]*gtsmodel.Tag
testMentions map[string]*gtsmodel.Mention
}
+
+func (suite *BunDBStandardTestSuite) SetupSuite() {
+ suite.testTokens = testrig.NewTestTokens()
+ suite.testClients = testrig.NewTestClients()
+ suite.testApplications = testrig.NewTestApplications()
+ suite.testUsers = testrig.NewTestUsers()
+ suite.testAccounts = testrig.NewTestAccounts()
+ suite.testAttachments = testrig.NewTestAttachments()
+ suite.testStatuses = testrig.NewTestStatuses()
+ suite.testTags = testrig.NewTestTags()
+ suite.testMentions = testrig.NewTestMentions()
+}
+
+func (suite *BunDBStandardTestSuite) SetupTest() {
+ suite.config = testrig.NewTestConfig()
+ suite.db = testrig.NewTestDB()
+ suite.log = testrig.NewTestLog()
+
+ testrig.StandardDBSetup(suite.db, suite.testAccounts)
+}
+
+func (suite *BunDBStandardTestSuite) TearDownTest() {
+ testrig.StandardDBTeardown(suite.db)
+}