Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Verifies annotations are present in the descriptor
  • Loading branch information
ilopezluna committed Feb 24, 2025
commit e089773ea12fd509058741c4bfe02dbbd54db5b2
5 changes: 5 additions & 0 deletions pkg/v1/remote/referrers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ func TestReferrers(t *testing.T) {
t.Fatalf("referrers diff (-want,+got): %s", d)
}

// Verify the annotations are present in the descriptor
if got := m2.Manifests[0].Annotations["annotation-key"]; got != "annotation-value" {
t.Errorf("expected annotation 'annotation-key' to be 'annotation-value', got %q", got)
}

if leg.tryFallback {
// Get the referrers by querying the root image's fallback tag directly.
tag, err := name.ParseReference(fmt.Sprintf("%s/repo:sha256-%s", u.Host, rootDesc.Digest.Hex))
Expand Down