From 39d3bfc84517757ae9c4d54e89ce459358291b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Mon, 31 Jan 2022 17:27:40 -1000 Subject: [PATCH] Fix $openldap::server::database::dboptions data type PR #343 was right about this and the point was missed in #348 which did not fixed it. Fix it for good! --- manifests/server/database.pp | 2 +- spec/defines/openldap_server_database_spec.rb | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/manifests/server/database.pp b/manifests/server/database.pp index 9afdf384..bffeff60 100644 --- a/manifests/server/database.pp +++ b/manifests/server/database.pp @@ -15,7 +15,7 @@ Optional[String[1]] $updateref = undef, Array[String[1]] $limits = [], # BDB/HDB options - Array[String[1]] $dboptions = [], + Hash[String[1],Variant[String[1],Array[String[1]]]] $dboptions = {}, Optional[String[1]] $synctype = undef, # Synchronization options Optional[Boolean] $mirrormode = undef, diff --git a/spec/defines/openldap_server_database_spec.rb b/spec/defines/openldap_server_database_spec.rb index bfb246a1..6cc87f83 100644 --- a/spec/defines/openldap_server_database_spec.rb +++ b/spec/defines/openldap_server_database_spec.rb @@ -42,12 +42,14 @@ 'dn.exact="cn=personnel,dc=example,dc=org" size=unlimited', 'dn.exact="cn=dirsync,dc=example,dc=org" size=100000' ], - dboptions: [ - 'set_cachesize 0 10485760 0', - 'set_lg_bsize 2097512', - 'set_lg_dir /var/tmp/bdb-log', - 'set_flags DB_LOG_AUTOREMOVE', - ], + dboptions: { + config: [ + 'set_cachesize 0 10485760 0', + 'set_lg_bsize 2097512', + 'set_lg_dir /var/tmp/bdb-log', + 'set_flags DB_LOG_AUTOREMOVE', + ], + }, synctype: 'inclusive', mirrormode: true, syncusesubentry: 'wxw',