diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-07-10 11:34:53 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-07-10 11:34:53 -0500 |
commit | 3c0c1fd2efa981f18091782434c1f0ac77462b8e (patch) | |
tree | 7776233f9248d4e1caee6ad859af3a524347d926 /test/support | |
parent | d7a37fddd1fc5169ae8c714d0baf8e5372a5f1d5 (diff) | |
parent | ce9514000db1e08a69b8874f21e66261b9261d86 (diff) | |
download | pleroma-3c0c1fd2efa981f18091782434c1f0ac77462b8e.tar.gz |
Merge branch 'develop' into issue/1790-updated-oban
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/cluster.ex | 2 | ||||
-rw-r--r-- | test/support/factory.ex | 8 | ||||
-rw-r--r-- | test/support/http_request_mock.ex | 28 |
3 files changed, 37 insertions, 1 deletions
diff --git a/test/support/cluster.ex b/test/support/cluster.ex index deb37f361..524194cf4 100644 --- a/test/support/cluster.ex +++ b/test/support/cluster.ex @@ -97,7 +97,7 @@ defmodule Pleroma.Cluster do silence_logger_warnings(fn -> node_configs |> Enum.map(&Task.async(fn -> start_slave(&1) end)) - |> Enum.map(&Task.await(&1, 60_000)) + |> Enum.map(&Task.await(&1, 90_000)) end) end diff --git a/test/support/factory.ex b/test/support/factory.ex index af580021c..635d83650 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -428,4 +428,12 @@ defmodule Pleroma.Factory do user: build(:user) } end + + def filter_factory do + %Pleroma.Filter{ + user: build(:user), + filter_id: sequence(:filter_id, & &1), + phrase: "cofe" + } + end end diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 3d5128835..19a202654 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -308,6 +308,22 @@ defmodule HttpRequestMock do }} end + def get("https://framatube.org/accounts/framasoft", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/https___framatube.org_accounts_framasoft.json") + }} + end + + def get("https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/framatube.org-video.json") + }} + end + def get("https://peertube.social/accounts/craigmaloney", _, _, _) do {:ok, %Tesla.Env{ @@ -1326,6 +1342,18 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/relay/relay.json")}} end + def get("http://localhost:4001/", _, "", Accept: "text/html") do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/7369654.html")}} + end + + def get("https://osada.macgirvin.com/", _, "", Accept: "text/html") do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/https___osada.macgirvin.com.html") + }} + end + def get(url, query, body, headers) do {:error, "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{ |