From 20d6ed54c729051ab9490a2df8f5b8e8c9d98035 Mon Sep 17 00:00:00 2001 From: Phil Friderici Date: Wed, 9 Aug 2023 15:52:52 +0000 Subject: [PATCH] Remove traces of remote_file from unit tests and .fixtures.yml When remote_file got replaced by archive [1] the unit tests were not updated accordingly. Removes errors. rspec ./spec/defines/ca_spec.rb:141 # ca_cert::ca os-dependent items On Debian based systems with a remote certificate is expected to contain Remote_file[/usr/local/share/ca-certificates/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt" rspec ./spec/defines/ca_spec.rb:202 # ca_cert::ca os-dependent items On RedHat based systems with a remote certificate is expected to contain Remote_file[/etc/pki/ca-trust/source/anchors/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt" rspec ./spec/defines/ca_spec.rb:246 # ca_cert::ca os-dependent items On RedHat based systems when explicitly distrusting a certificate is expected to contain Remote_file[/etc/pki/ca-trust/source/blacklist/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt" rspec ./spec/defines/ca_spec.rb:273 # ca_cert::ca os-dependent items On Suse 11 based systems with a remote certificate is expected to contain Remote_file[/etc/ssl/certs/Globalsign_Org_Intermediate.pem] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.pem" rspec ./spec/defines/ca_spec.rb:347 # ca_cert::ca os-dependent items On Suse 12 based systems with a remote certificate is expected to contain Remote_file[/etc/pki/trust/anchors/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt" rspec ./spec/defines/ca_spec.rb:393 # ca_cert::ca os-dependent items On Suse 12 based systems when explicitly distrusting a certificate is expected to contain Remote_file[/etc/pki/trust/blacklist/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt" [1] https://github.com/pcfens/puppet-ca_cert/pull/69/ --- .fixtures.yml | 1 - spec/defines/ca_spec.rb | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index cac4d89..e3b2f23 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,7 +1,6 @@ fixtures: repositories: stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" - remote_file: "https://github.com/lwf/puppet-remote_file.git" puppet_archive: "https://github.com/voxpupuli/puppet-archive.git" symlinks: ca_cert: "#{source_dir}" diff --git a/spec/defines/ca_spec.rb b/spec/defines/ca_spec.rb index 2fbb35b..b9e66fb 100644 --- a/spec/defines/ca_spec.rb +++ b/spec/defines/ca_spec.rb @@ -138,7 +138,7 @@ end it { - is_expected.to contain_remote_file(DEBIAN_CA_FILE).with( + is_expected.to contain_archive(DEBIAN_CA_FILE).with( 'ensure' => 'present', 'source' => HTTP_URL, ) @@ -199,7 +199,7 @@ end it { - is_expected.to contain_remote_file(REDHAT_CA_FILE).with( + is_expected.to contain_archive(REDHAT_CA_FILE).with( 'ensure' => 'present', 'source' => HTTP_URL, ) @@ -243,7 +243,7 @@ end it { - is_expected.to contain_remote_file(DISTRUSTED_REDHAT_CA_FILE).with( + is_expected.to contain_archive(DISTRUSTED_REDHAT_CA_FILE).with( 'ensure' => 'present', 'source' => HTTP_URL, ) @@ -270,7 +270,7 @@ end it { - is_expected.to contain_remote_file(SUSE_11_CA_FILE).with( + is_expected.to contain_archive(SUSE_11_CA_FILE).with( 'ensure' => 'present', 'source' => SUSE_11_HTTP_URL, ) @@ -344,7 +344,7 @@ end it { - is_expected.to contain_remote_file(SUSE_12_CA_FILE).with( + is_expected.to contain_archive(SUSE_12_CA_FILE).with( 'ensure' => 'present', 'source' => HTTP_URL, ) @@ -390,7 +390,7 @@ end it { - is_expected.to contain_remote_file(DISTRUSTED_SUSE_12_CA_FILE).with( + is_expected.to contain_archive(DISTRUSTED_SUSE_12_CA_FILE).with( 'ensure' => 'present', 'source' => HTTP_URL, )