diff options
author | 2024-06-13 15:08:43 +0200 | |
---|---|---|
committer | 2024-06-13 15:08:43 +0200 | |
commit | 9d9013db4cb44f9e1f241f625e39eaea282fe995 (patch) | |
tree | c9e8976544f88889def9a28b1710e579efc06fa8 /internal/processing/workers | |
parent | [chore] Don't render sign-up form when registrations closed (#3001) (diff) | |
download | gotosocial-9d9013db4cb44f9e1f241f625e39eaea282fe995.tar.xz |
[chore] Update move test (#3005)
Diffstat (limited to 'internal/processing/workers')
-rw-r--r-- | internal/processing/workers/fromfediapi_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/processing/workers/fromfediapi_test.go b/internal/processing/workers/fromfediapi_test.go index e69e2c7a8..b28927f39 100644 --- a/internal/processing/workers/fromfediapi_test.go +++ b/internal/processing/workers/fromfediapi_test.go @@ -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") |