Pass hackney tls config into email tests, #2101
authorAlex Gleason <alex@alexgleason.me>
Mon, 21 Sep 2020 20:05:46 +0000 (15:05 -0500)
committerAlex Gleason <alex@alexgleason.me>
Mon, 21 Sep 2020 20:26:10 +0000 (15:26 -0500)
test/user_test.exs
test/web/admin_api/controllers/admin_api_controller_test.exs

index 301d8f05e6290be3fdf2cb87d7445d5622aab458..9cabb501c169c3dabb87d381a7d029949ca09d8c 100644 (file)
@@ -509,7 +509,12 @@ defmodule Pleroma.UserTest do
       cng = User.register_changeset(%User{}, @full_user_data)
       {:ok, registered_user} = User.register(cng)
       ObanHelpers.perform_all()
-      assert_email_sent(Pleroma.Emails.UserEmail.account_confirmation_email(registered_user))
+
+      Pleroma.Emails.UserEmail.account_confirmation_email(registered_user)
+      # temporary hackney fix until hackney max_connections bug is fixed
+      # https://git.pleroma.social/pleroma/pleroma/-/issues/2101
+      |> Swoosh.Email.put_private(:hackney_options, ssl_options: [versions: [:"tlsv1.2"]])
+      |> assert_email_sent()
     end
 
     test "it requires an email, name, nickname and password, bio is optional when account_activation_required is enabled" do
index dbf478edf0dd2c9fb87299fb7a5595774d87726a..f1e9b89386b0c633d456b884bfc6a9d4b63a232f 100644 (file)
@@ -1927,7 +1927,12 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
                }"
 
       ObanHelpers.perform_all()
-      assert_email_sent(Pleroma.Emails.UserEmail.account_confirmation_email(first_user))
+
+      Pleroma.Emails.UserEmail.account_confirmation_email(first_user)
+      # temporary hackney fix until hackney max_connections bug is fixed
+      # https://git.pleroma.social/pleroma/pleroma/-/issues/2101
+      |> Swoosh.Email.put_private(:hackney_options, ssl_options: [versions: [:"tlsv1.2"]])
+      |> assert_email_sent()
     end
   end