registry/storage: clean up zero-length blob comments

A previous inspection of the code surrounding zero-length blobs led to
some interesting question. After inspection, it was found that the hash
was indeed for the empty string (""), and not an empty tar, so the code
was correct. The variable naming and comments have been updated
accordingly.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-01-27 14:47:45 -08:00
parent 545102ea07
commit 7f565ed65a
No known key found for this signature in database
GPG key ID: 67B3DED84EDC823F
2 changed files with 6 additions and 6 deletions

View file

@ -530,7 +530,7 @@ func TestLayerUploadZeroLength(t *testing.T) {
}
bs := repository.Blobs(ctx)
simpleUpload(t, bs, []byte{}, digestSha256EmptyTar)
simpleUpload(t, bs, []byte{}, digestSha256Empty)
}
func simpleUpload(t *testing.T, bs distribution.BlobIngester, blob []byte, expectedDigest digest.Digest) {