mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 17:26:06 +01:00
Makes the test LDAP host configurable (#21674).
git-svn-id: http://svn.redmine.org/redmine/trunk@15088 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -22,6 +22,8 @@ if ENV["COVERAGE"]
|
||||
SimpleCov.start 'rails'
|
||||
end
|
||||
|
||||
$redmine_test_ldap_server = ENV['REDMINE_TEST_LDAP_SERVER'] || '127.0.0.1'
|
||||
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
||||
require 'rails/test_help'
|
||||
@@ -122,7 +124,7 @@ class ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def self.ldap_configured?
|
||||
@test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389)
|
||||
@test_ldap = Net::LDAP.new(:host => $redmine_test_ldap_server, :port => 389)
|
||||
return @test_ldap.bind
|
||||
rescue Exception => e
|
||||
# LDAP is not listening
|
||||
|
||||
Reference in New Issue
Block a user