diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index be29eed..b549d07 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -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 \.}) - 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 \.}) - end - end - context 'when osfamily is unsupported' do let :facts do { osfamily: 'Unsupported',