Allow the Remote Fetcher to attempt fetching an unreachable instance
This commit is contained in:
parent
f17f92105b
commit
12c052551b
3 changed files with 11 additions and 30 deletions
|
|
@ -6,13 +6,11 @@ defmodule Pleroma.Workers.RemoteFetcherWorkerTest do
|
|||
use Pleroma.DataCase
|
||||
use Oban.Testing, repo: Pleroma.Repo
|
||||
|
||||
alias Pleroma.Instances
|
||||
alias Pleroma.Workers.RemoteFetcherWorker
|
||||
|
||||
@deleted_object_one "https://deleted-404.example.com/"
|
||||
@deleted_object_two "https://deleted-410.example.com/"
|
||||
@unauthorized_object "https://unauthorized.example.com/"
|
||||
@unreachable_object "https://unreachable.example.com/"
|
||||
@depth_object "https://depth.example.com/"
|
||||
|
||||
describe "RemoteFetcherWorker" do
|
||||
|
|
@ -59,17 +57,6 @@ defmodule Pleroma.Workers.RemoteFetcherWorkerTest do
|
|||
})
|
||||
end
|
||||
|
||||
test "does not fetch an unreachable instance" do
|
||||
Instances.set_consistently_unreachable(@unreachable_object)
|
||||
|
||||
refute Instances.reachable?(@unreachable_object)
|
||||
|
||||
assert {:discard, _} =
|
||||
RemoteFetcherWorker.perform(%Oban.Job{
|
||||
args: %{"op" => "fetch_remote", "id" => @unreachable_object}
|
||||
})
|
||||
end
|
||||
|
||||
test "does not requeue an object that exceeded depth" do
|
||||
clear_config([:instance, :federation_incoming_replies_max_depth], 0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue