Move api constants in separate 'constants' package to avoid circular imports

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
Petu Eusebiu
2022-03-24 14:25:14 +02:00
committed by Ramkumar Chinchani
parent f53dc9eb8d
commit 353b0c6034
6 changed files with 66 additions and 56 deletions
+2 -1
View File
@@ -20,6 +20,7 @@ import (
"gopkg.in/resty.v1"
"zotregistry.io/zot/pkg/api"
"zotregistry.io/zot/pkg/api/config"
"zotregistry.io/zot/pkg/api/constants"
. "zotregistry.io/zot/pkg/test"
)
@@ -181,7 +182,7 @@ func TestAuditLogMessages(t *testing.T) {
So(resp.StatusCode(), ShouldEqual, http.StatusCreated)
blobLoc := Location(baseURL, resp)
So(blobLoc, ShouldNotBeEmpty)
So(resp.Header().Get(api.DistContentDigestKey), ShouldNotBeEmpty)
So(resp.Header().Get(constants.DistContentDigestKey), ShouldNotBeEmpty)
// wait until the file is populated
byteValue, _ = ioutil.ReadAll(auditFile)