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

Fix yum year rollover unit test #492

Merged
merged 3 commits into from
Jan 2, 2024
Merged

Fix yum year rollover unit test #492

merged 3 commits into from
Jan 2, 2024

Conversation

Schamper
Copy link
Member

@Schamper Schamper commented Jan 2, 2024

It previously relied on the modified timestamp of the test file, but fresh checkouts will now have a modification time in 2024. This fix mocks the modified timestamp to be in 2023.

@Schamper Schamper mentioned this pull request Jan 2, 2024
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (502d16b) 74.05% compared to head (459daf5) 74.05%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #492   +/-   ##
=======================================
  Coverage   74.05%   74.05%           
=======================================
  Files         260      260           
  Lines       21070    21070           
=======================================
  Hits        15603    15603           
  Misses       5467     5467           
Flag Coverage Δ
unittests 74.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Schamper Schamper requested a review from Miauwkeru January 2, 2024 11:03
@Schamper Schamper requested a review from Miauwkeru January 2, 2024 11:08
@Schamper Schamper merged commit ae79ef5 into main Jan 2, 2024
@Schamper Schamper deleted the fix-yum-test branch January 2, 2024 11:28
@JSCU-CNI
Copy link
Contributor

JSCU-CNI commented Jan 2, 2024

Thanks for the quick fix. That was definitely an oversight from our side. We've built map_dir_from_tar and map_file_from_tar functions to help in keeping stuff like mtime preserved when testing (using TarFilesystem). Would you be interested in a PR for these functions?

@Schamper
Copy link
Member Author

Schamper commented Jan 2, 2024

How would those work, map_dir_from_tar("/path/to/file.tar", "/path/to/dir")?

If it's not too much effort, it couldn't hurt to submit a PR for it.

Poeloe pushed a commit that referenced this pull request Feb 29, 2024
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants