Test environment stability improvements (#703)

* Add climate_control gem and test helper

* Replace ENV mods in upgrades test

* Replace ENV mods in registrations test

* Remove ENV references in hostings controller

* Update ENV refs in mailer test

* ActiveStorage cleanup

* Consolidate queue config so appropriate adapter runs in test environment

* Make test environment more explicit

* Centralize self hosting config

* Remove flaky system test
This commit is contained in:
Zach Gollwitzer
2024-05-02 13:18:18 -04:00
committed by GitHub
parent 98df7ccb11
commit 5dfbba403a
14 changed files with 137 additions and 137 deletions

View File

@@ -7,6 +7,6 @@ module SelfHostable
private
def self_hosted?
ENV["SELF_HOSTING_ENABLED"] == "true"
Rails.configuration.app_mode.self_hosted?
end
end

View File

@@ -1,7 +1,7 @@
class ApplicationMailer < ActionMailer::Base
layout "mailer"
after_action :set_self_host_settings, if: -> { ENV["SELF_HOSTING_ENABLED"] == "true" }
after_action :set_self_host_settings, if: -> { Rails.configuration.app_mode.self_hosted? }
private