Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestValidateLayout(t *testing.T) {
manifest: manifestStr,
config: configStr,
tarList: []tarContent{
tarContent{&tar.Header{Name: "test", Size: 4, Mode: 0600}, []byte("test")},
{&tar.Header{Name: "test", Size: 4, Mode: 0600}, []byte("test")},
},
}

Expand Down
22 changes: 13 additions & 9 deletions image/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ func testUnpackLayer(t *testing.T, compression string, invalid bool) {
}

testManifest := manifest{
Layers: []v1.Descriptor{v1.Descriptor{
MediaType: mediatype,
Digest: digester.Digest(),
}},
Layers: []v1.Descriptor{
{
MediaType: mediatype,
Digest: digester.Digest(),
},
},
}
err = testManifest.unpack(newPathWalker(tmp1), filepath.Join(tmp1, "rootfs"))
if err != nil {
Expand Down Expand Up @@ -211,10 +213,12 @@ func TestUnpackLayerRemovePartialyUnpackedFile(t *testing.T) {
}

testManifest := manifest{
Layers: []v1.Descriptor{v1.Descriptor{
MediaType: "application/vnd.oci.image.layer.v1.tar+gzip",
Digest: digester.Digest(),
}},
Layers: []v1.Descriptor{
{
MediaType: "application/vnd.oci.image.layer.v1.tar+gzip",
Digest: digester.Digest(),
},
},
}
err = testManifest.unpack(newPathWalker(tmp1), filepath.Join(tmp1, "rootfs"))
if err != nil && !strings.Contains(err.Error(), "duplicate entry for") {
Expand All @@ -226,6 +230,6 @@ func TestUnpackLayerRemovePartialyUnpackedFile(t *testing.T) {
t.Fatal(err)
}
if err == nil {
t.Fatal("Execpt partialy unpacked file has been removed")
t.Fatal("Except partially unpacked file has been removed")
}
}