From 6c81f3d9351e9d9a2b3ea90503d38809a0d52e1b Mon Sep 17 00:00:00 2001 From: Nod0n Date: Tue, 14 Dec 2021 13:47:17 +0100 Subject: [PATCH] drop obsolete check Debian 9 and Ubuntu 16.04 are not supported by this plugin, so therefore this check is obsolete. --- .../letsencrypt_plugin_dns_rfc2136_spec.rb | 38 ++++++------------- .../letsencrypt_plugin_dns_route53_spec.rb | 27 +++---------- 2 files changed, 16 insertions(+), 49 deletions(-) diff --git a/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb b/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb index 32717744..78a71d09 100644 --- a/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb +++ b/spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb @@ -1,16 +1,6 @@ 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' : @@ -26,24 +16,18 @@ class { 'letsencrypt::plugin::dns_rfc2136': } 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 5b268827..b3ad0c00 100644 --- a/spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb +++ b/spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb @@ -1,16 +1,6 @@ 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' : @@ -23,18 +13,11 @@ 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