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

Refactor image vault utils #3846

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Sploder12
Copy link
Contributor

This PR refactors several functions related to image vault utilities. All util functions now have unit test coverage and can be mocked to ease testing for components that use the utilities. Some functions have been removed or moved to file_ops since they already exist or fit better there.

MULTI-1653

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 86.36364% with 9 lines in your changes missing coverage. Please review.

Project coverage is 89.08%. Comparing base (cbcb5e7) to head (f5c4598).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/platform/backends/lxd/lxd_vm_image_vault.cpp 50.00% 4 Missing ⚠️
src/xz_decoder/xz_image_decoder.cpp 0.00% 3 Missing ⚠️
src/daemon/default_vm_image_vault.cpp 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3846      +/-   ##
==========================================
+ Coverage   89.02%   89.08%   +0.06%     
==========================================
  Files         255      256       +1     
  Lines       14583    14591       +8     
==========================================
+ Hits        12982    12998      +16     
+ Misses       1601     1593       -8     

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

Copy link
Contributor

@sharder996 sharder996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @Sploder12

Thanks for tackling this. This has needed to be cleaned up for a while.

src/utils/file_ops.cpp Outdated Show resolved Hide resolved
tests/test_file_ops.cpp Show resolved Hide resolved
include/multipass/vm_image_vault.h Outdated Show resolved Hide resolved
@Sploder12 Sploder12 force-pushed the refactor-image-vault-utils branch from f128abb to 4ec3486 Compare January 17, 2025 14:17
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