diff options
author | Alexander Fisher <alex@linfratech.co.uk> | 2016-01-22 15:32:28 +0000 |
---|---|---|
committer | Alexander Fisher <alex@linfratech.co.uk> | 2016-01-22 15:38:12 +0000 |
commit | 9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (patch) | |
tree | 17641909f729f4980bc5ff10f241f032f98dfa4f /spec/defines | |
parent | 037949461d7b064adc0b041207bc026cdabf8a27 (diff) | |
download | puppet-samba-9d63c7be3fa57e4af93c787f8b740658ec14f1f6.tar.gz puppet-samba-9d63c7be3fa57e4af93c787f8b740658ec14f1f6.tar.bz2 |
Remove check_samba_user and add_samba_user scripts
Call the pdbedit commands directly from samba::server::user instead
Diffstat (limited to 'spec/defines')
-rw-r--r-- | spec/defines/samba__server__user_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/defines/samba__server__user_spec.rb b/spec/defines/samba__server__user_spec.rb new file mode 100644 index 0000000..c7ae00c --- /dev/null +++ b/spec/defines/samba__server__user_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' + +describe 'samba::server::user', :type => :define do + let(:title) { 'test_user' } + let(:params) {{ :password => 'secret' }} + + it { is_expected.to contain_samba__server__user('test_user') } + it { is_expected.to contain_exec('add smb account for test_user').with( + :command => '/bin/echo -e \'secret\nsecret\n\' | /usr/bin/pdbedit --password-from-stdin -a \'test_user\'', + :unless => '/usr/bin/pdbedit \'test_user\'', + :require => 'User[test_user]', + :notify => 'Class[Samba::Server::Service]' + ) } +end |