Skip to content

Commit

Permalink
Merge pull request #312 from voxpupuli/access
Browse files Browse the repository at this point in the history
Fix type of $openldap::server::access_wrapper::acl
  • Loading branch information
smortex authored Sep 3, 2021
2 parents 056f2f9 + 0f8fb49 commit ed3804f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/server/access_wrapper.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# }
#
define openldap::server::access_wrapper (
String[1] $acl,
Hash[String[1],Array[String[1]]] $acl,
String[1] $suffix = $name,
) {
# Parse ACL
Expand Down
41 changes: 41 additions & 0 deletions spec/defines/openldap_server_access_wrapper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require 'spec_helper'

describe 'openldap::server::access_wrapper' do
let(:title) { 'foo' }

let :pre_condition do
"class {'openldap::server':}"
end

on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts
end

let(:params) do
{
acl: {
'1 to *' => [
'by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage',
'by dn.exact=cn=admin,dc=example,dc=com write',
'by dn.exact=cn=replicator,dc=example,dc=com read',
'by * break',
],
'to attrs=userPassword,shadowLastChange' => [
'by dn="cn=admin,dc=example,dc=com" write',
'by self write',
'by anonymous auth',
],
'2 to *' => [
'by self read',
],
}
}
end

it { is_expected.to compile.with_all_deps }
it { is_expected.to have_openldap__server__access_resource_count(3) }
end
end
end

0 comments on commit ed3804f

Please sign in to comment.