Skip to content

Conversation

dmathieu
Copy link
Contributor

@dmathieu dmathieu commented May 7, 2019

The Write method of httpBlobUpload wasn't being tested. I've copied the ReadFrom tests using Write instead.

It's very similar to ReadFrom with the exception that the latter doesn't include any Content-* HTTP headers, because it can't know the size of a reader.
We could merge them to avoid repetition. But we'd then have to turn the reader into a bytes slice and back into a reader (for http.NewRequest).

Signed-off-by: Damien Mathieu <dmathieu@salesforce.com>
@codecov
Copy link

codecov bot commented Jun 25, 2019

Codecov Report

Merging #2918 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2918      +/-   ##
=========================================
+ Coverage   60.45%   60.5%   +0.04%     
=========================================
  Files         102     102              
  Lines        8002    8002              
=========================================
+ Hits         4838    4842       +4     
+ Misses       2515    2513       -2     
+ Partials      649     647       -2
Flag Coverage Δ
#linux 60.5% <ø> (+0.04%) ⬆️
Impacted Files Coverage Δ
registry/client/blob_writer.go 53.48% <0%> (+4.65%) ⬆️

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 79f6bcb...898b1f2. Read the comment docs.

Copy link
Contributor

@caervs caervs left a comment

Choose a reason for hiding this comment

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

LGTM

@caervs caervs merged commit 740d4d1 into distribution:master Sep 5, 2019
@dmathieu dmathieu deleted the test-blob-writer-write branch September 5, 2019 16:26
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