aboutsummaryrefslogtreecommitdiff
path: root/spec/acceptance/basic_samba_spec.rb
blob: e50cb2a90dea1e3f8470aaf1fb907a96ebba7bc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'spec_helper_acceptance'

describe 'basic samba' do
 context 'default parameters' do
    let(:pp) {"
      class { 'samba::server':
        workgroup     => 'example',
        server_string => 'Example Samba Server'
      }

      samba::server::share {'example-share':
        comment              => 'Example Share',
        path                 => '/path/to/share',
        guest_only           => true,
        guest_ok             => true,
        guest_account        => 'guest',
        browsable            => false,
        create_mask          => 0777,
        force_create_mask    => 0777,
        directory_mask       => 0777,
        force_directory_mode => 0777,
        force_group          => 'group',
        force_user           => 'user',
        hide_dot_files       => false,
        msdfs_root           => true,
      }
    "}

    it 'should apply with no errors' do
      apply_manifest(pp, :catch_failures=>true)
    end

    it 'should be idempotent' do
      apply_manifest(pp, :catch_changes=>true)
    end
  end
end