spacetx / slicedimage

MIT License
7 stars 3 forks source link

Add checksum verification to disk and http backends #46

Closed ttung closed 6 years ago

ttung commented 6 years ago
  1. Added a verify_checksum method to the _base class. It takes a handle, reads the data by chunk, and verifies the checksum.
  2. Remove checksum validation from CacheBackend if we are populating the cache (assumption: the backend supplying the data should have validated the checksum. However, we will now validate the data coming from the cache.
  3. Ported the tests from #42.
codecov-io commented 6 years ago

Codecov Report

Merging #46 into tonytung-no-seekable will increase coverage by 0.71%. The diff coverage is 100%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           tonytung-no-seekable      #46      +/-   ##
========================================================
+ Coverage                 79.92%   80.63%   +0.71%     
========================================================
  Files                        18       18              
  Lines                       518      532      +14     
========================================================
+ Hits                        414      429      +15     
+ Misses                      104      103       -1
Impacted Files Coverage Δ
slicedimage/backends/_caching.py 95.12% <100%> (+1.78%) :arrow_up:
slicedimage/backends/__init__.py 100% <100%> (ø) :arrow_up:
slicedimage/backends/_base.py 75.86% <100%> (+25.86%) :arrow_up:
slicedimage/backends/_http.py 100% <100%> (ø) :arrow_up:
slicedimage/backends/_disk.py 95.45% <100%> (+0.21%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3e3c364...b68d6ff. Read the comment docs.