Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 20:56:11 +01:00
forgejo/modules/activitypub
Gusted 4c67023c7e
tests: improve actvititypub integration test code
- Make use of `test.MockVariableValue` to override variables for the
duration of the test.
- Don't needlessly call `onGiteaRun`, its only needed when a HTTP server
needs to be called by the code.
- When `onGiteaRun` is used, make use of the passed parameters, such as
the passed `*testing.T` variable and `*url.URL` (this also avoids
needing to serve the routers in the test code again).
- Use `(*url.URL).JoinPath` to craft new URLs.
- Don't override `setting.AppURL` & `setting.Database.LogSQL` when its
does not affect the test.
- Add empty fixture files for `FederatedUser` & `FederationHost` so they
are truncated and do not persist between tests.
2024-11-01 22:39:49 +01:00
..
client.go feat: access ActivityPub client through interfaces to facilitate mocking in unit tests (#4853) 2024-08-07 05:45:24 +00:00
client_test.go chore: remove extra go-sqlite3 imports 2024-09-06 09:36:08 +00:00
main_test.go tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
user_settings.go Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
user_settings_test.go Use forum.gitea.com instead of old URL (#31989) 2024-09-09 20:54:47 +02:00