openshift/origin-server — pull request #808 by Miciah (2012-11-01 03:29:44+00:00)
Title: [test] Set ENV["RAILS_ENV"] in boot.rb

Instead of setting ENV["RAILS_ENV"] in environment.rb, do so in boot.rb.

When starting the broker normally or using script/rails, environment.rb
is read after Rails has been loaded and has set ENV["RAILS_ENV"] to the
default 'development', so Rails.env.development? returns true even when
the broker is configured to use the production environment. In the case
of oo-accept-broker, the application is started in such a way that
environment.rb is never loaded, so the development configuration is
always read even when the production configuration should be.

This commit fixes BZ871753 "[US2985][On-Premise]oo-accept-broker will
report failed for mongodb service checking even if mongodb is running."
oo-accept-broker was reading the setting for the MongoDB hostname from
the development configuration file instead of the production
configuration file, which caused the test to fail.