storage: improve/fix oci image validation

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2022-01-19 19:54:17 +00:00
committed by Ramkumar Chinchani
parent 8d6b36a61b
commit 87084f286b
20 changed files with 586 additions and 264 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ import (
"gopkg.in/resty.v1"
"zotregistry.io/zot/pkg/api"
"zotregistry.io/zot/pkg/api/config"
. "zotregistry.io/zot/test"
"zotregistry.io/zot/pkg/test"
)
const (
@@ -53,7 +53,7 @@ func TestTLSWithAuth(t *testing.T) {
defer func() { resty.SetTLSClientConfig(nil) }()
conf := config.New()
conf.HTTP.Port = SecurePort1
htpasswdPath := MakeHtpasswdFile()
htpasswdPath := test.MakeHtpasswdFile()
defer os.Remove(htpasswdPath)
conf.HTTP.Auth = &config.AuthConfig{
@@ -102,7 +102,7 @@ func TestTLSWithAuth(t *testing.T) {
home := os.Getenv("HOME")
destCertsDir := filepath.Join(home, certsDir1)
if err = CopyFiles(sourceCertsDir, destCertsDir); err != nil {
if err = test.CopyFiles(sourceCertsDir, destCertsDir); err != nil {
panic(err)
}
defer os.RemoveAll(destCertsDir)
@@ -201,7 +201,7 @@ func TestTLSWithoutAuth(t *testing.T) {
home := os.Getenv("HOME")
destCertsDir := filepath.Join(home, certsDir1)
if err = CopyFiles(sourceCertsDir, destCertsDir); err != nil {
if err = test.CopyFiles(sourceCertsDir, destCertsDir); err != nil {
panic(err)
}
defer os.RemoveAll(destCertsDir)