1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-14 14:37:20 +00:00

Fix some package registry problems (#34759)

1. Fix #33787
2. Fix container image display
This commit is contained in:
wxiaoguang
2025-06-19 00:32:43 +08:00
committed by GitHub
parent 7954f25290
commit a2ae7c69da
11 changed files with 118 additions and 60 deletions

View File

@ -562,8 +562,7 @@ func TestPackageContainer(t *testing.T) {
assert.ElementsMatch(t, []string{strings.ToLower(user.LowerName + "/" + image)}, getAllByName(pd.PackageProperties, container_module.PropertyRepository))
assert.True(t, has(pd.VersionProperties, container_module.PropertyManifestTagged))
// only the last manifest digest is associated with the version (OCI builders will push the index manifest digest as the final step)
assert.ElementsMatch(t, []string{untaggedManifestDigest}, getAllByName(pd.VersionProperties, container_module.PropertyManifestReference))
assert.ElementsMatch(t, []string{manifestDigest, untaggedManifestDigest}, getAllByName(pd.VersionProperties, container_module.PropertyManifestReference))
assert.IsType(t, &container_module.Metadata{}, pd.Metadata)
metadata := pd.Metadata.(*container_module.Metadata)