Skip to content

Commit

Permalink
[chore] Update move test (#3005)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmethurst authored Jun 13, 2024
1 parent fbdfce3 commit 9d9013d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions internal/processing/workers/fromfediapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,17 @@ func (suite *FromFediAPITestSuite) TestMoveAccount() {
})
suite.NoError(err)

// Wait for side effects to trigger:
// Zork should now be following admin account.
follows, err := testStructs.State.DB.IsFollowing(ctx, receivingAcct.ID, targetAcct.ID)
if err != nil {
suite.FailNow(err.Error())
if !testrig.WaitFor(func() bool {
follows, err := testStructs.State.DB.IsFollowing(ctx, receivingAcct.ID, targetAcct.ID)
if err != nil {
suite.FailNow(err.Error())
}
return follows
}) {
suite.FailNow("timed out waiting for zork to follow admin account")
}
suite.True(follows)

// Move should be in the DB.
move, err := testStructs.State.DB.GetMoveByURI(ctx, "https://fossbros-anonymous.io/users/foss_satan/moves/01HRA064871MR8HGVSAFJ333GM")
Expand Down

0 comments on commit 9d9013d

Please sign in to comment.