[chore] Inboxes for iri test (#508)

* tidy up some federation tests

* add missing license to following.go

* give zork some followers, as a treat

* test InboxesForIRI

* Go fmt

* update timeline tests
This commit is contained in:
tobi 2022-04-29 15:05:13 +02:00 committed by GitHub
commit 63f84da3e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 247 additions and 110 deletions

View file

@ -74,13 +74,12 @@ func (suite *IndexTestSuite) TestIndexBeforeLowID() {
err := suite.timeline.IndexBefore(context.Background(), "00000000000000000000000000", 10)
suite.NoError(err)
// the oldest indexed post should be the lowest one we have in our testrig
postID, err := suite.timeline.OldestIndexedItemID(context.Background())
suite.NoError(err)
suite.Equal("01F8MHAYFKS4KMXF8K5Y1C0KRN", postID)
suite.Equal("01F8MHBBN8120SYH7D5S050MGK", postID)
indexLength := suite.timeline.ItemIndexLength(context.Background())
suite.Equal(10, indexLength)
suite.Equal(9, indexLength)
}
func (suite *IndexTestSuite) TestIndexBeforeHighID() {
@ -108,9 +107,9 @@ func (suite *IndexTestSuite) TestIndexBehindHighID() {
suite.NoError(err)
suite.Equal("01FN3VJGFH10KR7S2PB0GFJZYG", postID)
// indexLength should be 10 because that's all this user has hometimelineable
// indexLength should be 9 because that's all this user has hometimelineable
indexLength := suite.timeline.ItemIndexLength(context.Background())
suite.Equal(10, indexLength)
suite.Equal(9, indexLength)
}
func (suite *IndexTestSuite) TestIndexBehindLowID() {