Skip to content

Commit

Permalink
Merge pull request #670 from mhashizume/PA-5266/main/prepare-digest
Browse files Browse the repository at this point in the history
(PA-5266) Change checksum algorithm to SHA256
  • Loading branch information
cthorn42 authored Sep 25, 2023
2 parents ffc0575 + c8c47cb commit f78b136
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions manifests/prepare/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
}

file { $local_package_file_path:
ensure => file,
owner => $puppet_agent::params::user,
group => $puppet_agent::params::group,
mode => $mode,
source => $source,
require => File[$puppet_agent::params::local_packages_dir],
checksum => sha256lite,
ensure => file,
owner => $puppet_agent::params::user,
group => $puppet_agent::params::group,
mode => $mode,
source => $source,
require => File[$puppet_agent::params::local_packages_dir],
}
}
13 changes: 6 additions & 7 deletions spec/classes/puppet_agent_osfamily_redhat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,13 @@

it {
is_expected.to contain_file('/opt/puppetlabs/packages/puppet-agent-6.12.0.rpm')
.with('path' => '/opt/puppetlabs/packages/puppet-agent-6.12.0.rpm')
.with('ensure' => 'file')
.with('owner' => '0')
.with('group' => '0')
.with('mode' => '0644')
.with('source' => 'http://just-some-download/url:90/puppet-agent-6.12.0.rpm')
.with('path' => '/opt/puppetlabs/packages/puppet-agent-6.12.0.rpm')
.with('ensure' => 'file')
.with('owner' => '0')
.with('group' => '0')
.with('mode' => '0644')
.with('source' => 'http://just-some-download/url:90/puppet-agent-6.12.0.rpm')
.that_requires('File[/opt/puppetlabs/packages]')
.with('checksum' => 'sha256lite')
}

it {
Expand Down

0 comments on commit f78b136

Please sign in to comment.