Commit graph

20 commits

Author SHA1 Message Date
Dessalines e336e5bcc0
Re-organizing federation tests. #746 #1040 (#1047)
* Re-organizing federation tests. #746 #1040

* Add more checks in inbox, plus some refactoring (#76)

Merge branch 'main' into more-inbox-permissions

Move check_community_ban() into helper function

Move slur check into helper functions

Move Claims::decode and site ban check into helper function

Note: this changes behaviour in that site ban is checked in more
places now. we could easily add a boolean parameter
check_for_site_ban to get the previous behaviour back

Rewrite user_inbox and community_inbox in the same way as shared_inbox

Add check against instance allowlist etc in shared_inbox

Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/76

* Adding verbose to test results.

Co-authored-by: nutomic <nutomic@noreply.yerbamate.dev>
Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Felix Ableitner <me@nutomic.com>
2020-08-04 10:57:37 -04:00
Felix Ableitner c9338027f2 Migrate user and group to new activitystreams library 2020-07-08 18:01:04 +02:00
Riley a074564458
Federation async (#848)
* Asyncify more

* I guess these changed

* Clean PR a bit

* Convert more away from failure error

* config changes for testing federation

* It was DNS

So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)

* Only retry for connecterror

Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error

* Use http sig norm 0.4.0-alpha for actix-web 3.0 support

* Blocking function, retry http requests

* cargo +nightly fmt

* Only create one pictrs dir

* Don't yarn build

* cargo +nightly fmt
2020-07-01 08:54:29 -04:00
Dessalines 4c1cb5999c Fixing some scripts for the federation-test 2020-06-27 14:54:42 -04:00
Dessalines f40f74b20d Adding additional 3-instance integration test for community announce. 2020-06-03 17:55:32 -04:00
Dessalines 22abbebd41 Lots of additions to federation.
- Added a shared inbox.
- Added federated comments, comment updates, and tests.
- Abstracted ap object sends into a common trait.
2020-04-27 12:57:00 -04:00
Dessalines df9135f410 Removing run-tests TODO. 2020-04-24 22:02:12 -04:00
Felix c3ac1649f2 Implement integration test for federation 2020-04-24 18:30:31 +02:00
Felix 509005fa0c Rename federation-test to federation, puller.rs to fetcher.rs 2020-04-10 13:37:35 +02:00
Felix Ableitner c16458b728 Avoid using database views in federation code 2020-04-03 11:00:24 +02:00
Felix 0d369e6019 Get image uploads working for federation-test 2020-03-28 17:30:59 +01:00
Felix Ableitner 390b204272 Rewrite federation settings 2020-03-18 22:09:00 +01:00
Felix Ableitner 8ebcc7ac02 Implemented basics for post federation, plus a bunch of other stuff 2020-03-14 22:03:05 +01:00
Felix Ableitner b01f4f75d6 WIP: federate posts between instances 2020-03-14 01:05:42 +01:00
Felix 27c07f1f84 Federate follower count, use string id for community 2020-03-12 03:35:32 +01:00
Felix 1f29e91796 Various minor federation improvements 2020-02-29 18:38:47 +01:00
Felix b854d8f3a0 Some federation improvements 2020-02-29 03:11:39 +01:00
Dessalines d932acad16 Merge branch 'federation' into dev_1 2020-02-05 12:51:03 -05:00
Felix 35489a706b Faster Docker build directly on host 2020-01-10 19:04:58 +01:00
Felix Ableitner 581f36d6ef Implementing very basic federation including test setup 2019-12-30 13:31:54 +01:00