Skip to content

Commit

Permalink
test: make test layouts smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjoelkamp committed Sep 19, 2024
1 parent fd4e741 commit 44c1356
Show file tree
Hide file tree
Showing 86 changed files with 128 additions and 942 deletions.
2 changes: 1 addition & 1 deletion attestation/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func manifestFromOCILayout(path string, platform *v1.Platform) (*Manifest, error
// try the containerd annotation if the org.opencontainers.image.ref.name is not a full name
subjectName = idxDescriptor.Annotations[containerd.AnnotationImageName]
if _, err := reference.ParseNamed(subjectName); err != nil {
return nil, fmt.Errorf("failed to parse subject name from annotations")
return nil, fmt.Errorf("failed to find subject name in annotations")
}
}

Expand Down
2 changes: 1 addition & 1 deletion attestation/layout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestSubjectNameAnnotations(t *testing.T) {
}{
{name: "oci annotation", ociLayoutPath: test.UnsignedTestImage("..")},
{name: "containerd annotation", ociLayoutPath: filepath.Join("..", "test", "testdata", "containerd-subject-layout")},
{name: "missing subject name", ociLayoutPath: filepath.Join("..", "test", "testdata", "missing-subject-layout"), errorStr: "failed to parse subject name from annotations"},
{name: "missing subject name", ociLayoutPath: filepath.Join("..", "test", "testdata", "missing-subject-layout"), errorStr: "failed to find subject name in annotations"},
}

for _, tc := range testCases {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"architecture":"unknown","os":"unknown","config":{},"rootfs":{"type":"layers","diff_ids":["sha256:e2c3b7df754e062b0c6b17c5262ea237fc86d68432e86e68724c57f04be3d064"]}}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 44c1356

Please sign in to comment.