This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
forked from haraldsk/puppet-module-nfs
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from sedan07/mount_naming
Changes to mount name param defined by server export class to remove spaces
- Loading branch information
Showing
4 changed files
with
42 additions
and
8 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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
source 'https://rubygems.org' | ||
|
||
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.3'] | ||
puppetversion = ENV.key?('PUPPET_GEM_VERSION') ? "#{ENV['PUPPET_GEM_VERSION']}" : ['>= 3.3'] | ||
facterversion = ENV.key?('FACTER_GEM_VERSION') ? "#{ENV['FACTER_GEM_VERSION']}" : ['>= 1.7'] | ||
gem 'puppet', puppetversion | ||
gem 'puppetlabs_spec_helper', '>= 0.1.0' | ||
gem 'puppet-lint', '>= 0.3.2' | ||
gem 'facter', '>= 1.7.0' | ||
gem 'facter', facterversion | ||
gem 'rspec', '< 3.2.0' |
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,10 +1,30 @@ | ||
require 'spec_helper' | ||
|
||
describe 'nfs::client::mount', :type => :define do | ||
let(:title) { '/srv/test' } | ||
let(:facts) { { :operatingsystem => 'ubuntu' } } | ||
let(:params) {{ :server => 'nfs.int.net', :share => '/srv/share' } } | ||
it do | ||
should contain_class('nfs::client') | ||
context "Mount created by exported resource" do | ||
let(:title) { 'shared /srv/test by nfs.int.net' } | ||
let(:facts) { { :operatingsystem => 'ubuntu', :clientcert => 'test.example.com' } } | ||
let(:params) {{ | ||
:server => 'nfs.int.net', | ||
:share => '/srv/share', | ||
:mount => '/srv/share' | ||
}} | ||
it do | ||
should compile | ||
should contain_class('nfs::client') | ||
should contain_mount('shared nfs.int.net:/srv/share by test.example.com /srv/share') | ||
end | ||
end | ||
|
||
context "Mount manually set" do | ||
let(:title) { '/srv/test' } | ||
let(:facts) { { :operatingsystem => 'ubuntu', :clientcert => 'test.example.com' } } | ||
let(:params) {{ :server => 'nfs.int.net', :share => '/srv/share' } } | ||
it do | ||
should compile | ||
should contain_class('nfs::client') | ||
should contain_mount('shared nfs.int.net:/srv/share by test.example.com /srv/test') | ||
#should contain_mount('/srv/test') | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
require 'puppetlabs_spec_helper/module_spec_helper' | ||
|
||
class Undef | ||
def inspect | ||
'undef' | ||
end | ||
end |