Revision f5d4e70a
Added by Jeremy Kitchen over 10 years ago
test/unit/smart_proxy_test.rb | ||
---|---|---|
end
|
||
assert_equal proxy.url, "http://some.proxy:4568"
|
||
end
|
||
|
||
def test_should_honor_legacy_puppet_hostname_true_setting
|
||
Setting[:legacy_puppet_hostname] = true
|
||
proxy = SmartProxy.new
|
||
proxy.name = "test proxy"
|
||
proxy.url = "http://puppet.example.com:4568"
|
||
|
||
assert_equal proxy.to_s, "puppet"
|
||
end
|
||
|
||
def test_should_honor_legacy_puppet_hostname_false_setting
|
||
Setting[:legacy_puppet_hostname] = false
|
||
proxy = SmartProxy.new
|
||
proxy.name = "test proxy"
|
||
proxy.url = "http://puppet.example.com:4568"
|
||
|
||
assert_equal proxy.to_s, "puppet.example.com"
|
||
end
|
||
end
|
Also available in: Unified diff
fixes #1745 - make puppetmaster hostname/domain stripping behaviour configurable