Tests: Make as many tests as possible async.
[akkoma] / test / pleroma / web / mastodon_api / controllers / search_controller_test.exs
index b77614b7c5554b253cff2529b04cfc3a77f5af93..1045ab2653044c8b5d3fc2b221f11611b0a39ab4 100644 (file)
@@ -279,7 +279,9 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
     end
 
     test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
-      clear_config([:instance, :search_function], :plain)
+      old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
+      :persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
+      on_exit(fn -> :persistent_term.put({Pleroma.Repo, :postgres_version}, old_version) end)
 
       capture_log(fn ->
         {:ok, %{id: activity_id}} =