Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify default for order parameter on auto::mount #65

Merged
merged 1 commit into from
Jun 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/mount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#
define autofs::mount (
Stdlib::Absolutepath $mount,
Integer $order,
Integer $order = 1,
Optional[Variant[Stdlib::Absolutepath,Autofs::Mapentry]] $mapfile = undef,
Optional[String] $options = '',
Stdlib::Absolutepath $master = '/etc/auto.master',
Expand Down
64 changes: 64 additions & 0 deletions spec/acceptance/autofs_two_indirect_spec.rb
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