[chore] Update move test (#3005)

This commit is contained in:
tobi 2024-06-13 15:08:43 +02:00 committed by GitHub
parent fbdfce3190
commit 9d9013db4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -627,12 +627,17 @@ func (suite *FromFediAPITestSuite) TestMoveAccount() {
}) })
suite.NoError(err) suite.NoError(err)
// Wait for side effects to trigger:
// Zork should now be following admin account. // Zork should now be following admin account.
if !testrig.WaitFor(func() bool {
follows, err := testStructs.State.DB.IsFollowing(ctx, receivingAcct.ID, targetAcct.ID) follows, err := testStructs.State.DB.IsFollowing(ctx, receivingAcct.ID, targetAcct.ID)
if err != nil { if err != nil {
suite.FailNow(err.Error()) suite.FailNow(err.Error())
} }
suite.True(follows) return follows
}) {
suite.FailNow("timed out waiting for zork to follow admin account")
}
// Move should be in the DB. // Move should be in the DB.
move, err := testStructs.State.DB.GetMoveByURI(ctx, "https://fossbros-anonymous.io/users/foss_satan/moves/01HRA064871MR8HGVSAFJ333GM") move, err := testStructs.State.DB.GetMoveByURI(ctx, "https://fossbros-anonymous.io/users/foss_satan/moves/01HRA064871MR8HGVSAFJ333GM")