diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2017-06-24 23:44:01 -0400 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2017-06-24 23:44:01 -0400 |
commit | 2472621c1c2e20c8fd8922674b83c6a815df1d38 (patch) | |
tree | ecb6a642dcfd71e54df8096964118bbf24d5a07d | |
parent | b5123b5cab87fa68ac6eddb098a803453dca54db (diff) |
specs: manually define debian_nextcodename when expected to be used
with puppet 4.x when you don't define the debian_nextcodename,
compilation fails saying that the variable is unknown. since we have
unit tests specifically for this fact's behaviour, we want to stub out
the fact's value in other tests so that we can verify the logic of
manifests is actually good.
-rw-r--r-- | spec/classes/init_spec.rb | 17 | ||||
-rw-r--r-- | spec/defines/conf_spec.rb | 17 | ||||
-rw-r--r-- | spec/defines/preferences_snippet_spec.rb | 17 |
3 files changed, 27 insertions, 24 deletions
diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 9ba554f..a3f19a0 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -5,14 +5,15 @@ describe 'apt', :type => :class do 'class { "apt": }' end let(:facts) { { - :lsbdistid => 'Debian', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :debian_release => 'jessie', - :debian_codename => 'jessie', - :lsbdistcodename => 'jessie', - :virtual => 'physical', - :puppetversion => Puppet.version, } } + :lsbdistid => 'Debian', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :debian_release => 'jessie', + :debian_codename => 'jessie', + :lsbdistcodename => 'jessie', + :debian_nextcodename => 'stretch', + :virtual => 'physical', + :puppetversion => Puppet.version, } } #it { is_expected.to compile.with_all_deps } it { is_expected.to compile } end diff --git a/spec/defines/conf_spec.rb b/spec/defines/conf_spec.rb index cc4fb1f..167b249 100644 --- a/spec/defines/conf_spec.rb +++ b/spec/defines/conf_spec.rb @@ -4,14 +4,15 @@ describe 'apt::apt_conf', :type => :define do 'class { "apt": }' end let(:facts) { { - :lsbdistid => 'Debian', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :debian_release => 'jessie', - :debian_codename => 'jessie', - :lsbdistcodename => 'jessie', - :virtual => 'physical', - :puppetversion => Puppet.version, } } + :lsbdistid => 'Debian', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :debian_release => 'jessie', + :debian_codename => 'jessie', + :lsbdistcodename => 'jessie', + :debian_nextcodename => 'stretch', + :virtual => 'physical', + :puppetversion => Puppet.version, } } let :title do 'norecommends' end diff --git a/spec/defines/preferences_snippet_spec.rb b/spec/defines/preferences_snippet_spec.rb index 012a5f6..6b1a23f 100644 --- a/spec/defines/preferences_snippet_spec.rb +++ b/spec/defines/preferences_snippet_spec.rb @@ -4,14 +4,15 @@ describe 'apt::preferences_snippet', :type => :define do 'class { "apt": }' end let(:facts) { { - :lsbdistid => 'Debian', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :debian_release => 'jessie', - :debian_codename => 'jessie', - :lsbdistcodename => 'jessie', - :virtual => 'physical', - :puppetversion => Puppet.version, } } + :lsbdistid => 'Debian', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :debian_release => 'jessie', + :debian_codename => 'jessie', + :lsbdistcodename => 'jessie', + :debian_nextcodename => 'stretch', + :virtual => 'physical', + :puppetversion => Puppet.version, } } let :title do 'test' end |