diff --git a/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb b/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb index 3271774..78a71d0 100644 --- a/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb +++ b/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb @@ -1,49 +1,33 @@ require 'spec_helper_acceptance' describe 'letsencrypt::plugin::dns_rfc2136' do - supported = case fact('os.family') - when 'Debian' - # Debian 9 has it in backports, Ubuntu started shipping in Bionic - fact('os.release.major') != '9' && fact('os.release.major') != '16.04' - when 'RedHat' - true - else - false - end - context 'with defaults values' do pp = <<-PUPPET class { 'letsencrypt' : email => 'letsregister@example.com', config => { 'server' => 'https://acme-staging-v02.api.letsencrypt.org/directory', }, } class { 'letsencrypt::plugin::dns_rfc2136': server => '192.0.2.1', key_name => 'certbot', key_secret => 'secret', } PUPPET - if supported - it 'installs letsencrypt and dns rfc2136 plugin without error' do - apply_manifest(pp, catch_failures: true) - end - it 'installs letsencrypt and dns rfc2136 idempotently' do - apply_manifest(pp, catch_changes: true) - end + it 'installs letsencrypt and dns rfc2136 plugin without error' do + apply_manifest(pp, catch_failures: true) + end + it 'installs letsencrypt and dns rfc2136 idempotently' do + apply_manifest(pp, catch_changes: true) + end - describe file('/etc/letsencrypt/dns-rfc2136.ini') do - it { is_expected.to be_file } - it { is_expected.to be_owned_by 'root' } - it { is_expected.to be_grouped_into 'root' } - it { is_expected.to be_mode 400 } - end - else - it 'fails to install' do - apply_manifest(pp, expect_failures: true) - end + describe file('/etc/letsencrypt/dns-rfc2136.ini') do + it { is_expected.to be_file } + it { is_expected.to be_owned_by 'root' } + it { is_expected.to be_grouped_into 'root' } + it { is_expected.to be_mode 400 } end end end diff --git a/spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb b/spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb index 5b26882..b3ad0c0 100644 --- a/spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb +++ b/spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb @@ -1,40 +1,23 @@ require 'spec_helper_acceptance' describe 'letsencrypt::plugin::dns_route53' do - supported = case fact('os.family') - when 'Debian' - # Debian 9 has it in backports, Ubuntu started shipping in Bionic - fact('os.release.major') != '9' && fact('os.release.major') != '16.04' - when 'RedHat' - true - else - false - end - context 'with defaults values' do pp = <<-PUPPET class { 'letsencrypt' : email => 'letsregister@example.com', config => { 'server' => 'https://acme-staging-v02.api.letsencrypt.org/directory', }, } class { 'letsencrypt::plugin::dns_route53': } PUPPET - if supported - it 'installs letsencrypt and dns route53 plugin without error' do - apply_manifest(pp, catch_failures: true) - end - it 'installs letsencrypt and dns route53 idempotently' do - apply_manifest(pp, catch_changes: true) - end - - else - it 'fails to install' do - apply_manifest(pp, expect_failures: true) - end + it 'installs letsencrypt and dns route53 plugin without error' do + apply_manifest(pp, catch_failures: true) + end + it 'installs letsencrypt and dns route53 idempotently' do + apply_manifest(pp, catch_changes: true) end end end