Skip to content

Commit

Permalink
add specs for read list option, closes ajjahn#68
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjahn committed Jul 10, 2016
1 parent 4688b2b commit 113514e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/server/share.pp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
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 ? {
Expand Down
10 changes: 10 additions & 0 deletions spec/defines/samba__server__share_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
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")
Expand Down Expand Up @@ -541,6 +542,15 @@
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) {{
Expand Down

0 comments on commit 113514e

Please sign in to comment.