Closed furuholm closed 7 years ago
can we add a unit test?
Sure. I would say that the manifest decoding parts makes the most sense to test. Extracting these to separate functions would make testing quite simple. Sounds good?
totally, thanks!
I have added a unit test for pulling manifest v2 images. I'm not sure why the unit test pulls docker-registry.domain.com/nginx:1b29e1531c whereas the injected response is for logstash. I did the same for the new unit test to make it consistent. I can change it to match the response if you'd like...
I also did a refactoring of the digest/blobsum refactoring, but while the code is more clear it introduces an extra copy of each digest/blobsum which makes it less efficient. I put that commit on top to make it easy to remove if you prefer to drop it. Whichever is fine for me.
@furuholm excellent work, thanks!
Solves #27