mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
refactor: Reduce zb binary size (#1783)
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"zotregistry.io/zot/pkg/log"
|
||||
"zotregistry.io/zot/pkg/storage/local"
|
||||
"zotregistry.io/zot/pkg/test"
|
||||
testc "zotregistry.io/zot/pkg/test/common"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -257,7 +258,7 @@ func TestVerifyMandatoryAnnotations(t *testing.T) {
|
||||
resp, err = resty.R().
|
||||
Post(fmt.Sprintf("%s/v2/zot-test/blobs/uploads/", baseURL))
|
||||
So(err, ShouldBeNil)
|
||||
loc := test.Location(baseURL, resp)
|
||||
loc := testc.Location(baseURL, resp)
|
||||
|
||||
_, err = resty.R().
|
||||
SetContentLength(true).
|
||||
@@ -344,7 +345,7 @@ func TestVerifyMandatoryAnnotations(t *testing.T) {
|
||||
_, err = resty.R().
|
||||
Post(fmt.Sprintf("%s/v2/zot-test/blobs/uploads/", baseURL))
|
||||
So(err, ShouldBeNil)
|
||||
loc := test.Location(baseURL, resp)
|
||||
loc := testc.Location(baseURL, resp)
|
||||
|
||||
_, err = resty.R().
|
||||
SetContentLength(true).
|
||||
|
||||
@@ -48,6 +48,7 @@ import (
|
||||
mTypes "zotregistry.io/zot/pkg/meta/types"
|
||||
storageConstants "zotregistry.io/zot/pkg/storage/constants"
|
||||
"zotregistry.io/zot/pkg/test"
|
||||
testc "zotregistry.io/zot/pkg/test/common"
|
||||
"zotregistry.io/zot/pkg/test/mocks"
|
||||
)
|
||||
|
||||
@@ -6329,7 +6330,7 @@ func pushRepo(url, repoName string) godigest.Digest {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
loc := test.Location(url, resp)
|
||||
loc := testc.Location(url, resp)
|
||||
|
||||
_, err = resty.R().Get(loc)
|
||||
if err != nil {
|
||||
@@ -6356,7 +6357,7 @@ func pushRepo(url, repoName string) godigest.Digest {
|
||||
panic(fmt.Errorf("invalid status code: %d %w", resp.StatusCode(), errBadStatus))
|
||||
}
|
||||
|
||||
loc = test.Location(url, resp)
|
||||
loc = testc.Location(url, resp)
|
||||
cblob, cdigest := ispec.DescriptorEmptyJSON.Data, ispec.DescriptorEmptyJSON.Digest
|
||||
|
||||
resp, err = resty.R().
|
||||
@@ -6385,7 +6386,7 @@ func pushRepo(url, repoName string) godigest.Digest {
|
||||
panic(fmt.Errorf("invalid status code: %d %w", resp.StatusCode(), errBadStatus))
|
||||
}
|
||||
|
||||
loc = test.Location(url, resp)
|
||||
loc = testc.Location(url, resp)
|
||||
cblob, cdigest = test.GetRandomImageConfig()
|
||||
|
||||
resp, err = resty.R().
|
||||
@@ -6553,7 +6554,7 @@ func pushBlob(url string, repoName string, buf []byte) godigest.Digest {
|
||||
panic(fmt.Errorf("invalid status code: %d %w", resp.StatusCode(), errBadStatus))
|
||||
}
|
||||
|
||||
loc := test.Location(url, resp)
|
||||
loc := testc.Location(url, resp)
|
||||
|
||||
digest := godigest.FromBytes(buf)
|
||||
resp, err = resty.R().
|
||||
|
||||
Reference in New Issue
Block a user