Add some validation and more tests

This commit is contained in:
Hunter Haugen
2014-08-13 12:10:49 -07:00
parent 66245138f4
commit 5683eaf74e
3 changed files with 126 additions and 18 deletions

View File

@@ -112,4 +112,43 @@ describe 'java', :type => :class do
it { should contain_package('java').with_name('java-1_7_0-openjdk-devel')}
end
describe 'incompatible OSs' do
[
{
# C14706
:osfamily => 'windows',
:operatingsystem => 'windows',
:operatingsystemrelease => '8.1',
},
{
# C14707
:osfamily => 'Darwin',
:operatingsystem => 'Darwin',
:operatingsystemrelease => '13.3.0',
},
{
# C14708
:osfamily => 'AIX',
:operatingsystem => 'AIX',
:operatingsystemrelease => '7100-02-00-000',
},
{
# C14708
:osfamily => 'AIX',
:operatingsystem => 'AIX',
:operatingsystemrelease => '6100-07-04-1216',
},
{
# C14708
:osfamily => 'AIX',
:operatingsystem => 'AIX',
:operatingsystemrelease => '5300-12-01-1016',
},
].each do |facts|
let(:facts) { facts }
it "should fail on #{facts[:operatingsystem]} #{facts[:operatingsystemrelease]}" do
expect { subject }.to raise_error Puppet::Error, /unsupported platform/
end
end
end
end