Skip to content

Commit 0cb5219

Browse files
committed
Add a comment justifying lack of unit test coverage
... to reinforce the rule that *_transport.go needs to have comprehensive unit tests, to the fullest possible extent. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
1 parent 56609e3 commit 0cb5219

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

oci/layout/oci_transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func (ref ociReference) getManifestDescriptor() (imgspecv1.Descriptor, int, erro
219219
}
220220

221221
switch {
222-
case ref.image != "" && ref.sourceIndex != -1:
222+
case ref.image != "" && ref.sourceIndex != -1: // Coverage: newReference refuses to create such references.
223223
return imgspecv1.Descriptor{}, -1, fmt.Errorf("Internal error: Cannot have both ref %s and source index @%d",
224224
ref.image, ref.sourceIndex)
225225

0 commit comments

Comments
 (0)