From 8b52ad0bef938712ce98e9a91711ca2d100c4ae3 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 1 Aug 2023 16:12:54 +0100 Subject: [PATCH] Oban upgrade --- .woodpecker/test.yml | 2 +- config/test.exs | 4 +--- mix.exs | 2 +- mix.lock | 2 +- test/pleroma/emoji/loader_test.exs | 2 +- test/pleroma/web/activity_pub/side_effects_test.exs | 3 ++- test/pleroma/web/common_api_test.exs | 3 ++- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index 72850443c..2e12d3b54 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -96,4 +96,4 @@ pipeline: - mix ecto.drop -f -q - mix ecto.create - mix ecto.migrate - - mix test --preload-modules --exclude erratic --exclude federated --max-cases 4 + - mix test --preload-modules --exclude erratic --exclude federated --max-cases 1 diff --git a/config/test.exs b/config/test.exs index 0bb84662b..5958f99ef 100644 --- a/config/test.exs +++ b/config/test.exs @@ -82,9 +82,7 @@ config :web_push_encryption, :vapid_details, private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA" config :pleroma, Oban, - queues: false, - crontab: false, - plugins: false + testing: :manual config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 2, diff --git a/mix.exs b/mix.exs index 7109b8f0a..52afc35c2 100644 --- a/mix.exs +++ b/mix.exs @@ -123,7 +123,7 @@ defmodule Pleroma.Mixfile do {:ecto_enum, "~> 1.4"}, {:ecto_sql, "~> 3.10.0"}, {:postgrex, "~> 0.17.2"}, - {:oban, "~> 2.12.1"}, + {:oban, "~> 2.15.2"}, {:gettext, "~> 0.20.0"}, {:bcrypt_elixir, "~> 2.2"}, {:fast_sanitize, "~> 0.2.3"}, diff --git a/mix.lock b/mix.lock index 437a0d745..a8ccd3732 100644 --- a/mix.lock +++ b/mix.lock @@ -79,7 +79,7 @@ "nimble_options": {:hex, :nimble_options, "1.0.2", "92098a74df0072ff37d0c12ace58574d26880e522c22801437151a159392270e", [:mix], [], "hexpm", "fd12a8db2021036ce12a309f26f564ec367373265b53e25403f0ee697380f1b8"}, "nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, "nimble_pool": {:hex, :nimble_pool, "0.2.6", "91f2f4c357da4c4a0a548286c84a3a28004f68f05609b4534526871a22053cde", [:mix], [], "hexpm", "1c715055095d3f2705c4e236c18b618420a35490da94149ff8b580a2144f653f"}, - "oban": {:hex, :oban, "2.12.1", "f604d7e6a8be9fda4a9b0f6cebbd633deba569f85dbff70c4d25d99a6f023177", [:mix], [{:ecto_sql, "~> 3.6", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9b1844c2b74e0d788b73e5144b0c9d5674cb775eae29d88a36f3c3b48d42d058"}, + "oban": {:hex, :oban, "2.15.2", "8f934a49db39163633965139c8846d8e24c2beb4180f34a005c2c7c3f69a6aa2", [:mix], [{:ecto_sql, "~> 3.6", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:ecto_sqlite3, "~> 0.9", [hex: :ecto_sqlite3, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0f4a579ea48fc7489e0d84facf8b01566e142bdc6542d7dabce32c10e664f1e9"}, "open_api_spex": {:hex, :open_api_spex, "3.16.4", "5515ccbe0143264cb0492f4c2c5a2efb517c0a477d51c77cc0f0d460dba9ed4e", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 3.0 or ~> 4.0 or ~> 5.0", [hex: :poison, repo: "hexpm", optional: true]}, {:ymlr, "~> 2.0 or ~> 3.0", [hex: :ymlr, repo: "hexpm", optional: true]}], "hexpm", "5b2411e40adc490c27991db12cba08f3fcb74b7bd0a7bab437eadb5389a96492"}, "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, "phoenix": {:hex, :phoenix, "1.6.16", "e5bdd18c7a06da5852a25c7befb72246de4ddc289182285f8685a40b7b5f5451", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 1.0 or ~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e15989ff34f670a96b95ef6d1d25bad0d9c50df5df40b671d8f4a669e050ac39"}, diff --git a/test/pleroma/emoji/loader_test.exs b/test/pleroma/emoji/loader_test.exs index de89e3bc4..d49269603 100644 --- a/test/pleroma/emoji/loader_test.exs +++ b/test/pleroma/emoji/loader_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Emoji.LoaderTest do - use ExUnit.Case, async: true + use ExUnit.Case, async: false alias Pleroma.Emoji.Loader describe "match_extra/2" do diff --git a/test/pleroma/web/activity_pub/side_effects_test.exs b/test/pleroma/web/activity_pub/side_effects_test.exs index 94b6a11b3..fec68bc68 100644 --- a/test/pleroma/web/activity_pub/side_effects_test.exs +++ b/test/pleroma/web/activity_pub/side_effects_test.exs @@ -512,10 +512,11 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do test "enqueues the poll end", %{activity: activity, meta: meta} do {:ok, activity, meta} = SideEffects.handle(activity, meta) + {:ok, time, _} = DateTime.from_iso8601(meta[:object_data]["closed"]) assert_enqueued( worker: Pleroma.Workers.PollWorker, args: %{op: "poll_end", activity_id: activity.id}, - scheduled_at: NaiveDateTime.from_iso8601!(meta[:object_data]["closed"]) + scheduled_at: time ) end end diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index e877048cc..cc2f92758 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -50,10 +50,11 @@ defmodule Pleroma.Web.CommonAPITest do assert object.data["type"] == "Question" assert object.data["oneOf"] |> length() == 2 + {:ok, time, _} = DateTime.from_iso8601(object.data["closed"]) assert_enqueued( worker: PollWorker, args: %{op: "poll_end", activity_id: activity.id}, - scheduled_at: NaiveDateTime.from_iso8601!(object.data["closed"]) + scheduled_at: time ) end end