aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/server/share.pp2
-rw-r--r--spec/defines/samba__server__share_spec.rb10
2 files changed, 11 insertions, 1 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp
index b68013b..7cf0ffc 100644
--- a/manifests/server/share.pp
+++ b/manifests/server/share.pp
@@ -189,7 +189,7 @@ define samba::server::share($ensure = present,
default => "set \"${target}/veto oplock files\" '${veto_oplock_files}'",
},
$read_list ? {
- '' => "rm \"${target}/read list\"",
+ '' => "rm \"${target}/read list\"",
default => "set \"${target}/read list\" '${read_list}'",
},
$write_list ? {
diff --git a/spec/defines/samba__server__share_spec.rb b/spec/defines/samba__server__share_spec.rb
index 645b987..f6d1925 100644
--- a/spec/defines/samba__server__share_spec.rb
+++ b/spec/defines/samba__server__share_spec.rb
@@ -34,6 +34,7 @@ shared_examples "default share" do
set.with("oplocks")
set.with("level2 oplocks")
set.with("veto oplock files")
+ set.with("read list")
set.with("write list")
set.with("hide dot files")
set.with("root preexec")
@@ -541,6 +542,15 @@ describe 'samba::server::share', :type => :define do
let(:change_set) { default_changes.with("veto oplock files", "'testing'") }
end
+ context 'with read_list set to "bill,ben"' do
+ include_examples "default share"
+ let(:params) {{
+ :ensure => 'present',
+ :read_list => 'bill,ben',
+ }}
+ let(:change_set) { default_changes.with("read list", "'bill,ben'") }
+ end
+
context 'with write_list set to "bill,ben"' do
include_examples "default share"
let(:params) {{