diff options
author | 2022-09-21 19:55:52 +0200 | |
---|---|---|
committer | 2022-09-21 19:55:52 +0200 | |
commit | 4cf76a2bfcc2c19bdd34f1bd58d8545d3499481b (patch) | |
tree | 47f558153875675cd7e4d0109e1028d2101ff8da /internal/processing/fromfederator_test.go | |
parent | [docs] Add --config-path to example CLI commands where needed. (#843) (diff) | |
download | gotosocial-4cf76a2bfcc2c19bdd34f1bd58d8545d3499481b.tar.xz |
[chore] Tidy up status deletion, remove from cache too (#845)
* add func for deleting status from db + cache
* move deletes entirely back to processor
and also only do a delete if the requesting account owns the item being deleted
* tidy up unboost processing
* delete status more efficiently
* fix wrong account id on remote test attachments
* fix federator test
Diffstat (limited to 'internal/processing/fromfederator_test.go')
-rw-r--r-- | internal/processing/fromfederator_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/processing/fromfederator_test.go b/internal/processing/fromfederator_test.go index 8489303e8..385f3b134 100644 --- a/internal/processing/fromfederator_test.go +++ b/internal/processing/fromfederator_test.go @@ -368,9 +368,12 @@ func (suite *FromFederatorTestSuite) TestProcessAccountDelete() { suite.False(zorkFollowsSatan) // no statuses from foss satan should be left in the database - dbStatuses, err := suite.db.GetAccountStatuses(ctx, deletedAccount.ID, 0, false, false, "", "", false, false, false) - suite.ErrorIs(err, db.ErrNoEntries) - suite.Empty(dbStatuses) + if !testrig.WaitFor(func() bool { + s, err := suite.db.GetAccountStatuses(ctx, deletedAccount.ID, 0, false, false, "", "", false, false, false) + return s == nil && err == db.ErrNoEntries + }) { + suite.FailNow("timeout waiting for statuses to be deleted") + } dbAccount, err := suite.db.GetAccountByID(ctx, deletedAccount.ID) suite.NoError(err) |