From 7f253c3d28aa3606c1177df1b6273db314e46d2c Mon Sep 17 00:00:00 2001 From: Jarek Radosz <jradosz@gmail.com> Date: Tue, 31 May 2022 13:01:37 +0200 Subject: [PATCH] FIX: Unset RAILS_ENV to allow running both dev stuff and test (#629) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Trying to run specs with RAILS_ENV=development ends up like: ``` /usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: âï¸ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis. Randomized with seed 1716 FF Failures: 1) CategoryBadge escapes HTML in category names / descriptions Failure/Error: DB.test_transaction = ActiveRecord::Base.connection.current_transaction NoMethodError: undefined method `test_transaction=' for #<MiniSqlMultisiteConnection:0x000055a7662ea1e0> # ./spec/rails_helper.rb:284:in `block (2 levels) in <top (required)>' # ./spec/rails_helper.rb:277:in `block (2 levels) in <top (required)>' ``` --- image/discourse_dev/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index 96373b2..cac5cb0 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -1,7 +1,9 @@ # NAME: discourse/discourse_dev # VERSION: release FROM discourse/base:release -ENV RAILS_ENV development + +# Unset RAILS_ENV to allow running both dev stuff and tests +ENV RAILS_ENV= #LABEL maintainer="Sam Saffron \"https://twitter.com/samsaffron\"" -- 2.25.1