mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
test(meta): add push-pull-read tests for metadb (#2022)
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
@@ -385,6 +385,10 @@ func (bdw *BoltDB) SearchRepos(ctx context.Context, searchText string,
|
||||
|
||||
delete(protoRepoMeta.Tags, "")
|
||||
|
||||
if len(protoRepoMeta.Tags) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
protoRepoMeta.Rank = int32(rank)
|
||||
protoRepoMeta.IsStarred = zcommon.Contains(userStars, protoRepoMeta.Name)
|
||||
protoRepoMeta.IsBookmarked = zcommon.Contains(userBookmarks, protoRepoMeta.Name)
|
||||
|
||||
@@ -277,7 +277,7 @@ func RemoveImageFromRepoMeta(repoMeta *proto_go.RepoMeta, repoBlobs *proto_go.Re
|
||||
|
||||
queue := []string{descriptor.Digest}
|
||||
|
||||
mConvert.GetProtoEarlierUpdatedImage(updatedLastImage, &proto_go.RepoLastUpdatedImage{
|
||||
updatedLastImage = mConvert.GetProtoEarlierUpdatedImage(updatedLastImage, &proto_go.RepoLastUpdatedImage{
|
||||
LastUpdated: repoBlobs.Blobs[descriptor.Digest].LastUpdated,
|
||||
MediaType: descriptor.MediaType,
|
||||
Digest: descriptor.Digest,
|
||||
|
||||
@@ -459,6 +459,12 @@ func (dwr *DynamoDB) SearchRepos(ctx context.Context, searchText string) ([]mTyp
|
||||
continue
|
||||
}
|
||||
|
||||
delete(protoRepoMeta.Tags, "")
|
||||
|
||||
if len(protoRepoMeta.Tags) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
rank := common.RankRepoName(searchText, protoRepoMeta.Name)
|
||||
if rank == -1 {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user