mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 21:48:04 +08:00
fix(storage): do not open/download blobs when validating manifests (#1566)
when pushing manifests, zot will validate blobs (layers + config blob) are present in repo, currently it opens(in case of filesystem storage) or download( in case of cloud storage) each blob. fixed that by adding a new method ImageStore.CheckBlobPresence() on storage to check blobs presence without checking the cache like ImageStore.CheckBlob() method does. Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -3439,7 +3439,12 @@ func TestCrossRepoMount(t *testing.T) {
|
||||
}
|
||||
|
||||
dir := t.TempDir()
|
||||
ctlr := makeController(conf, dir, "../../test/data")
|
||||
err := os.MkdirAll(path.Join(dir, "zot-cve-test"), storageConstants.DefaultDirPerms)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
ctlr := makeController(conf, path.Join(dir, "zot-cve-test"), "../../test/data/zot-cve-test")
|
||||
|
||||
ctlr.Config.Storage.RootDirectory = dir
|
||||
ctlr.Config.Storage.RemoteCache = false
|
||||
ctlr.Config.Storage.Dedupe = false
|
||||
|
||||
@@ -3551,7 +3556,7 @@ func TestCrossRepoMount(t *testing.T) {
|
||||
cm.StartAndWait(port)
|
||||
|
||||
// wait for dedupe task to run
|
||||
time.Sleep(15 * time.Second)
|
||||
time.Sleep(10 * time.Second)
|
||||
|
||||
params["mount"] = string(manifestDigest)
|
||||
postResponse, err = client.R().
|
||||
|
||||
Reference in New Issue
Block a user