Skip to content

Commit

Permalink
remove non-supported OS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Feb 12, 2024
1 parent 697db32 commit 99cacca
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,70 +366,6 @@
end
end

context 'when major release of Amazon Linux is unsupported' do
let :facts do
{ osfamily: 'RedHat',
operatingsystem: 'Amazon',
operatingsystemmajrelease: '3',
monit_version: '5' }
end

it 'fails' do
expect do
is_expected.to contain_class('monit')
end.to raise_error(Puppet::Error, %r{monit supports Amazon Linux 2\. Detected operatingsystemmajrelease is <3>})
end
end

context 'when major release of EL is unsupported' do
let :facts do
{ osfamily: 'RedHat',
operatingsystem: 'CentOS',
operatingsystemmajrelease: '4',
monit_version: '5' }
end

it 'fails' do
expect do
is_expected.to contain_class('monit')
end.to raise_error(Puppet::Error, %r{monit supports EL 5, 6 and 7\. Detected operatingsystemmajrelease is <4>})
end
end

context 'when major release of Debian is unsupported' do
let :facts do
{ osfamily: 'Debian',
operatingsystemmajrelease: '4',
lsbdistcodename: 'etch',
monit_version: '5' }
end

it 'fails' do
expect do
is_expected.to contain_class('monit')
end.to raise_error(Puppet::Error, %r{monit supports Debian 6 \(squeeze\), 7 \(wheezy\), 8 \(jessie\), 9 \(stretch\) and 10 \(buster\) \
and Ubuntu 10\.04 \(lucid\), 12\.04 \(precise\), 14\.04 \(trusty\), 16\.04 \(xenial\) and 18\.04 \(bionic\)\. \
Detected lsbdistcodename is <etch>\.})
end
end

context 'when major release of Ubuntu is unsupported' do
let :facts do
{ osfamily: 'Debian',
operatingsystemmajrelease: '8',
lsbdistcodename: 'hardy',
monit_version: '5' }
end

it 'fails' do
expect do
is_expected.to contain_class('monit')
end.to raise_error(Puppet::Error, %r{monit supports Debian 6 \(squeeze\), 7 \(wheezy\), 8 \(jessie\), 9 \(stretch\) and 10 \(buster\) \
and Ubuntu 10\.04 \(lucid\), 12\.04 \(precise\), 14\.04 \(trusty\), 16\.04 \(xenial\) and 18\.04 \(bionic\). \
Detected lsbdistcodename is <hardy>\.})
end
end

context 'when osfamily is unsupported' do
let :facts do
{ osfamily: 'Unsupported',
Expand Down

0 comments on commit 99cacca

Please sign in to comment.