From f5c004d67d4ed66b6c6df100afec47174aa14ae0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 25 May 2023 10:37:38 +0200 Subject: [feature] Add List functionality (#1802) * start working on lists * further list work * test list db functions nicely * more work on lists * peepoopeepoo * poke * start list timeline func * we're getting there lads * couldn't be me working on stuff... could it? * hook up handlers * fiddling * weeee * woah * screaming, pissing * fix streaming being a whiny baby * lint, small test fix, swagger * tidying up, testing * fucked! by the linter * move timelines to state like a boss * add timeline start to tests using state * invalidate lists --- internal/db/bundb/bundb_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/db/bundb/bundb_test.go') diff --git a/internal/db/bundb/bundb_test.go b/internal/db/bundb/bundb_test.go index 2566be2ba..84e11447a 100644 --- a/internal/db/bundb/bundb_test.go +++ b/internal/db/bundb/bundb_test.go @@ -22,6 +22,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/state" + "github.com/superseriousbusiness/gotosocial/internal/visibility" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -46,6 +47,8 @@ type BunDBStandardTestSuite struct { testReports map[string]*gtsmodel.Report testBookmarks map[string]*gtsmodel.StatusBookmark testFaves map[string]*gtsmodel.StatusFave + testLists map[string]*gtsmodel.List + testListEntries map[string]*gtsmodel.ListEntry } func (suite *BunDBStandardTestSuite) SetupSuite() { @@ -63,6 +66,8 @@ func (suite *BunDBStandardTestSuite) SetupSuite() { suite.testReports = testrig.NewTestReports() suite.testBookmarks = testrig.NewTestBookmarks() suite.testFaves = testrig.NewTestFaves() + suite.testLists = testrig.NewTestLists() + suite.testListEntries = testrig.NewTestListEntries() } func (suite *BunDBStandardTestSuite) SetupTest() { @@ -70,6 +75,7 @@ func (suite *BunDBStandardTestSuite) SetupTest() { testrig.InitTestLog() suite.state.Caches.Init() suite.db = testrig.NewTestDB(&suite.state) + testrig.StartTimelines(&suite.state, visibility.NewFilter(&suite.state), testrig.NewTestTypeConverter(suite.db)) testrig.StandardDBSetup(suite.db, suite.testAccounts) } -- cgit v1.2.3