prevent retained tag with same digest deleted by other tag

Signed-off-by: Ziming Zhang <zziming@vmware.com>
Change-Id: I37a3ef0d4cff7214e35076453494d89f0ad84d43
This commit is contained in:
Ziming Zhang 2019-08-28 18:27:35 +08:00
parent 8290af6d25
commit 4248f7a45e

View File

@ -119,6 +119,7 @@ func (frc *fakeRetentionClient) GetCandidates(repo *res.Repository) ([]*res.Cand
Repository: "harbor", Repository: "harbor",
Kind: "image", Kind: "image",
Tag: "latest", Tag: "latest",
Digest: "latest",
PushedTime: time.Now().Unix() - 11, PushedTime: time.Now().Unix() - 11,
PulledTime: time.Now().Unix() - 2, PulledTime: time.Now().Unix() - 2,
CreationTime: time.Now().Unix() - 10, CreationTime: time.Now().Unix() - 10,
@ -129,6 +130,7 @@ func (frc *fakeRetentionClient) GetCandidates(repo *res.Repository) ([]*res.Cand
Repository: "harbor", Repository: "harbor",
Kind: "image", Kind: "image",
Tag: "dev", Tag: "dev",
Digest: "dev",
PushedTime: time.Now().Unix() - 10, PushedTime: time.Now().Unix() - 10,
PulledTime: time.Now().Unix() - 3, PulledTime: time.Now().Unix() - 3,
CreationTime: time.Now().Unix() - 20, CreationTime: time.Now().Unix() - 20,