Skip to content

Commit 2504f3a

Browse files
test: validation for zabbix_api_access
1 parent f505084 commit 2504f3a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/classes/web_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,20 @@
235235
it { is_expected.to contain_file('/etc/zabbix/web/zabbix.conf.php').with_content(%r{^\$SSO\['IDP_CERT'\] = '/etc/zabbix/web/idp.cert'}) }
236236
it { is_expected.to contain_file('/etc/zabbix/web/zabbix.conf.php').with_content(%r{^\$SSO\['SETTINGS'\] = \[ \n "strict" => true,\n "baseurl" => "http://example.com/sp/",\n "security" => \[\n "signatureAlgorithm" => "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384",\n "digestAlgorithm" => "http://www.w3.org/2001/04/xmldsig-more#sha384",\n "singleLogoutService" => \[\n "responseUrl" => ""\n \]\n \]\n\];}) }
237237
end
238+
239+
describe 'with restriction to api access' do
240+
let :params do
241+
super().merge(
242+
zabbix_api_access: ['127.0.0.1']
243+
)
244+
end
245+
246+
it {
247+
is_expected.to contain_concat__fragment('zabbix.example.com-directories').with(
248+
content: %r{^\s+Require host 127\.0\.0\.1$}
249+
)
250+
}
251+
end
238252
end
239253
end
240254
end

0 commit comments

Comments
 (0)