Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-12047) Add test to ensure MD5 checksum is skipped for FIPS #9407

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

AriaXLi
Copy link
Contributor

@AriaXLi AriaXLi commented Jul 1, 2024

This commit adds a test to http_metadata_spec.rb that checks that the MD5 checksum type is skipped in the collect method on FIPS enabled platforms.

@AriaXLi AriaXLi requested a review from a team as a code owner July 1, 2024 19:25
@AriaXLi
Copy link
Contributor Author

AriaXLi commented Jul 1, 2024

This PR adds a test to the changes made in #9405

This commit adds a test to http_metadata_spec.rb that checks that
the MD5 checksum type is skipped in the collect method on FIPS enabled
platforms.
@AriaXLi
Copy link
Contributor Author

AriaXLi commented Jul 2, 2024

This test will fail & not skip md5 when I revert 1f7c8ef:

❯ git revert -m1 1f7c8ef
❯ bundle exec rspec ./spec/unit/file_serving/http_metadata_spec.rb:38
Run options:
  include {:locations=>{"./spec/unit/file_serving/http_metadata_spec.rb"=>[38]}}
  exclude {:benchmark=>true}
F

Failures:

  1) Puppet::FileServing::HttpMetadata when initializing skips md5 checksum type in collect on FIPS enabled platforms
     Failure/Error: expect( metadata.checksum_type ).to eq :mtime

       expected: :mtime
            got: :md5

       (compared using ==)

       Diff:
       @@ -1 +1 @@
       -:mtime
       +:md5

     # ./spec/unit/file_serving/http_metadata_spec.rb:37:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:180:in `block (2 levels) in <top (required)>'

@joshcooper joshcooper merged commit 7739378 into puppetlabs:main Jul 2, 2024
9 checks passed
@mhashizume mhashizume added the maintenance Maintenance chores are excluded from changelogs label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance chores are excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants