You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the tests for package extraction just check if the process doesn't error out. This doesn't really test if a package is properly extracted.
The tests for validating packages do use the same code to extract a package and validate its content but it would be nice if we could compute a sha256 hash of an extracted package and validate that that is indeed what we would expect.
We can use the rstest crate to create test cases with the package to extract and an expected hash as an input. e.g.:
When developing this feature some care is required to ensure that symlinks are properly hashed. I think it would be better to hash the link itself instead of the content it points to. This is because ../a and ./../a refer to the same file but are different symlinks.
The text was updated successfully, but these errors were encountered:
I think we're now checking all the files in the extracted packages folder when linking, so we can be at least reasonably sure that this is indeed working fine :)
Currently, the tests for package extraction just check if the process doesn't error out. This doesn't really test if a package is properly extracted.
The tests for validating packages do use the same code to extract a package and validate its content but it would be nice if we could compute a sha256 hash of an extracted package and validate that that is indeed what we would expect.
We can use the
rstest
crate to create test cases with the package to extract and an expected hash as an input. e.g.:When developing this feature some care is required to ensure that symlinks are properly hashed. I think it would be better to hash the link itself instead of the content it points to. This is because
../a
and./../a
refer to the same file but are different symlinks.The text was updated successfully, but these errors were encountered: