Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update code to allow for the special -hosts map
- Loading branch information
1 parent
97e95b4
commit 26be07c
Showing
3 changed files
with
47 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'autofs::mount -hosts test' do | ||
context 'basic special -hosts test' do | ||
it 'applies' do | ||
pp = <<-MANIFEST | ||
class { 'autofs': } | ||
autofs::mount { 'auto.net': | ||
mount => '/net', | ||
mapfile_manage => false, | ||
mapfile => '-hosts', | ||
} | ||
MANIFEST | ||
|
||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe file('/etc/auto.master') do | ||
it 'exists and has content' do | ||
is_expected.to exist | ||
is_expected.to be_owned_by 'root' | ||
is_expected.to be_grouped_into 'root' | ||
end | ||
|
||
its(:content) { is_expected.to contain('/net -hosts') } | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This type matches a map type and path. | ||
# @example program:/etc/auto.smb | ||
# @example file:/etc/auto.file | ||
# @example hsots:-hosts | ||
|
||
type Autofs::Mapentry = Pattern[/^[a-z]+:\/([^\/\0]+(\/)?)+$/] | ||
|
||
type Autofs::Mapentry = Pattern[/^[a-z]+:\/([^\/\0]+(\/)?)+$|^-hosts$/] |