diff options
author | Adam Jahn <ajjahn@gmail.com> | 2016-07-10 14:19:57 -0400 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2016-07-10 14:19:57 -0400 |
commit | 113514e18a349e574be1205ee5008ee4e2c872c4 (patch) | |
tree | 0214943cf6f0e9bc48043fb1b399f1d017a558cf | |
parent | 4688b2bd2dc2393a1eacc583ce663634d01f70bb (diff) | |
download | puppet-samba-113514e18a349e574be1205ee5008ee4e2c872c4.tar.gz puppet-samba-113514e18a349e574be1205ee5008ee4e2c872c4.tar.bz2 |
add specs for read list option, closes #68
-rw-r--r-- | manifests/server/share.pp | 2 | ||||
-rw-r--r-- | spec/defines/samba__server__share_spec.rb | 10 |
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) {{ |