Skip to content

Commit e089773

Browse files
committed
Verifies annotations are present in the descriptor
1 parent b091e40 commit e089773

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/v1/remote/referrers_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ func TestReferrers(t *testing.T) {
145145
t.Fatalf("referrers diff (-want,+got): %s", d)
146146
}
147147

148+
// Verify the annotations are present in the descriptor
149+
if got := m2.Manifests[0].Annotations["annotation-key"]; got != "annotation-value" {
150+
t.Errorf("expected annotation 'annotation-key' to be 'annotation-value', got %q", got)
151+
}
152+
148153
if leg.tryFallback {
149154
// Get the referrers by querying the root image's fallback tag directly.
150155
tag, err := name.ParseReference(fmt.Sprintf("%s/repo:sha256-%s", u.Host, rootDesc.Digest.Hex))

0 commit comments

Comments
 (0)