summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/create_test.go
AgeCommit message (Collapse)AuthorFiles
2025-01-28[chore] remove type switch in Create() and instead move to ↵Libravatar kim1
FederatedCallbacks() (#3697) * remove type switch in Create() and instead move to FederatedCallbacks() * add missing (my bad!) federating wrapped callbacks behaviour * add missing license header :innocent: * fix create flag test to use correct function
2024-04-26[performance] update remaining worker pools to use queues (#2865)Libravatar kim1
* start replacing client + federator + media workers with new worker + queue types * refactor federatingDB.Delete(), drop queued messages when deleting account / status * move all queue purging to the processor workers * undo toolchain updates * code comments, ensure dereferencer worker pool gets started * update gruf libraries in readme * start the job scheduler separately to the worker pools * reshuffle ordering or server.go + remove duplicate worker start / stop * update go-list version * fix vendoring * move queue invalidation to before wipeing / deletion, to ensure queued work not dropped * add logging to worker processing functions in testrig, don't start workers in unexpected places * update go-structr to add (+then rely on) QueueCtx{} type * ensure more worker pools get started properly in tests * fix remaining broken tests relying on worker queue logic * fix account test suite queue popping logic, ensure noop workers do not pull from queue * move back accidentally shuffled account deletion order * ensure error (non nil!!) gets passed in refactored federatingDB{}.Delete() * silently drop deletes from accounts not permitted to * don't warn log on forwarded deletes * make if else clauses easier to parse * use getFederatorMsg() * improved code comment * improved code comment re: requesting account delete checks * remove boolean result from worker start / stop since false = already running or already stopped * remove optional passed-in http.client * remove worker starting from the admin CLI commands (we don't need to handle side-effects) * update prune cli to start scheduler but not all of the workers * fix rebase issues * remove redundant return statements * i'm sorry sir linter
2024-01-31[bugfix] parent status replied to status not dereferenced sometimes (#2587)Libravatar kim1
* much simplified DereferenceStatusAncestors(), also handles edge cases now * perform status acceptibility check before handling even as forward * don't further dereference ancestors if they're up to date * call enrichStatusSafely() directly to ensure we get error messages * change getStatusByURI() semantics to return error + old model on failed update, fix deref ancestor to check for staleness before refetch * perform a nil-check on the status.Local variable, in case it hasn't been set on new status attempting refresh * more consistently set returned parent status, don't check if updated * only home-timeline statuses if explicitly visible AND not explicitly invisible! * fix broken test now that status acceptibility checks happen on forwarded statuses
2023-11-04[feature] support canceling scheduled tasks, some federation API performance ↵Libravatar kim1
improvements (#2329)
2023-08-08[bugfix] don't accept unrelated statuses (#2078)Libravatar kim1
Co-authored-by: Daenney <daenney@users.noreply.github.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney1
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-01-25[feature] Accept incoming federated Flag activity (#1382)Libravatar tobi1
* start working on handling incoming Flag activity * interim commit * federate Flag in successfully
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi1
2022-11-30[bugfix] Don't call `strings.ToLower()` on usernames when selecting account ↵Libravatar tobi1
by domain+username (#1190) * don't lowercase account username when doing a select * test getting remote user with uppercase username
2022-04-28replace async client API / federator msg processing with worker pools (#497)Libravatar kim1
* replace async client API / federator msg processing with worker pools * appease our lord-and-saviour, the linter
2021-12-20Extend license notices to 2022 (#354)Libravatar tobi1
2021-10-10Handle forwarded messages (#273)Libravatar tobi1
* correct path of foss_satan * add APIri and notes * test create forward note * rename target => receiving account * split up create into separate funcs * update extractFromCtx * tidy up from federator processing * foss satan => http not https * check if status in db * mock dereference of status from IRI * add forward message deref test * update test with activities * add remote_account_2 to test rig