cname_lookup: Accept array for nameservers
... because the actual option accepts a list value written in comma-separated string format. Change-Id: Iac7afaed600fefdc36aecf5c65a9b815fb2bee8e Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -66,7 +66,7 @@ class swift::proxy::cname_lookup (
|
|||||||
'filter:cname_lookup/set log_address': value => $log_address;
|
'filter:cname_lookup/set log_address': value => $log_address;
|
||||||
'filter:cname_lookup/storage_domain' : value => $storage_domain;
|
'filter:cname_lookup/storage_domain' : value => $storage_domain;
|
||||||
'filter:cname_lookup/lookup_depth' : value => $lookup_depth;
|
'filter:cname_lookup/lookup_depth' : value => $lookup_depth;
|
||||||
'filter:cname_lookup/nameservers' : value => $nameservers;
|
'filter:cname_lookup/nameservers' : value => join(any2array($nameservers), ',');
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'python-dnspython':
|
package { 'python-dnspython':
|
||||||
|
@@ -41,6 +41,16 @@ describe 'swift::proxy::cname_lookup' do
|
|||||||
it { is_expected.to contain_swift_proxy_config('filter:cname_lookup/lookup_depth').with_value('2') }
|
it { is_expected.to contain_swift_proxy_config('filter:cname_lookup/lookup_depth').with_value('2') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:cname_lookup/nameservers').with_value('8.8.8.8') }
|
it { is_expected.to contain_swift_proxy_config('filter:cname_lookup/nameservers').with_value('8.8.8.8') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "when nameservers parameter accept an array" do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:nameservers => ['8.8.8.8', '8.8.4.4'],
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:cname_lookup/nameservers').with_value('8.8.8.8,8.8.4.4') }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
|
Reference in New Issue
Block a user