-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify default for order parameter on auto::mount
The `order` parameter to `auto::mount` ```puppet auto::mount{'home': mount => '/home', mapfile => '/etc/auto.home', order => 3, ... } ``` currently must be specified. Especially since in the vast majority of cases the order of the lines in `/etc/auto.master` is irrelevent a default this value can be specified. Motification, less mandatory options always good.
- Loading branch information
1 parent
ff8d91d
commit 647a30f
Showing
2 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'autofs::mount indirect tests' do | ||
context 'two indirect test, order not specified' do | ||
it 'applies' do | ||
pp = <<-EOS | ||
class { 'autofs': } | ||
autofs::mount { 'foo': | ||
mount => '/foo', | ||
mapfile => '/etc/auto.foo', | ||
mapcontents => ['FOO -o rw /mnt/test_FOO'], | ||
options => '--timeout=120', | ||
} | ||
autofs::mount { 'bar': | ||
mount => '/bar', | ||
mapfile => '/etc/auto.bar', | ||
mapcontents => ['BAR -o rw /mnt/test_BAR'], | ||
options => '--timeout=240', | ||
} | ||
EOS | ||
|
||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe file('/etc/auto.master') do | ||
it 'exists and have content' do | ||
is_expected.to exist | ||
is_expected.to be_owned_by 'root' | ||
is_expected.to be_grouped_into 'root' | ||
is_expected.to contain '/foo /etc/auto.foo --timeout=120' | ||
is_expected.to contain '/bar /etc/auto.bar --timeout=240' | ||
end | ||
end | ||
|
||
describe file('/etc/auto.foo') do | ||
it 'exists and have content' do | ||
is_expected.to exist | ||
is_expected.to be_owned_by 'root' | ||
is_expected.to be_grouped_into 'root' | ||
is_expected.to contain 'FOO -o rw /mnt/test_FOO' | ||
end | ||
end | ||
|
||
describe file('/etc/auto.bar') do | ||
it 'exists and have content' do | ||
is_expected.to exist | ||
is_expected.to be_owned_by 'root' | ||
is_expected.to be_grouped_into 'root' | ||
is_expected.to contain 'BAR -o rw /mnt/test_BAR' | ||
end | ||
end | ||
|
||
describe package('autofs') do | ||
it { is_expected.to be_installed } | ||
end | ||
|
||
describe service('autofs') do | ||
it { is_expected.to be_enabled } | ||
it { is_expected.to be_running } | ||
end | ||
end | ||
end |