Skip to content

Commit

Permalink
Merge pull request #51 from puppetlabs/fix_checksum
Browse files Browse the repository at this point in the history
(maint) Flip version detection
  • Loading branch information
mhashizume authored Feb 28, 2023
2 parents 1c3583b + 8217dcf commit c9de996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/acceptance/tests/yumrepo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def resource(host, type, name)
# absent removes the entry, leaving an empty file with a known checksum
assert_equal(res['ensure'], 'file')

# Puppet 7 uses SHA256 as the default digest algorithm
if %r{^7\.}.match?(on(agent, puppet('--version')).stdout)
assert_equal(res['content'], '{sha256}e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
else
# Puppet 7 and up uses SHA256 as the default digest algorithm
if %r{^6\.}.match?(on(agent, puppet('--version')).stdout)
assert_equal(res['content'], '{md5}d41d8cd98f00b204e9800998ecf8427e')
else
assert_equal(res['content'], '{sha256}e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
end
end
end
Expand Down

0 comments on commit c9de996

Please sign in to comment.