mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
fix: running tests locally fails (#1879)
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
@@ -36,6 +36,7 @@ import (
|
||||
test "zotregistry.io/zot/pkg/test/common"
|
||||
. "zotregistry.io/zot/pkg/test/image-utils"
|
||||
"zotregistry.io/zot/pkg/test/signature"
|
||||
tskip "zotregistry.io/zot/pkg/test/skip"
|
||||
)
|
||||
|
||||
type errReader int
|
||||
@@ -122,7 +123,7 @@ func TestSignatureUploadAndVerificationLocal(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSignatureUploadAndVerificationAWS(t *testing.T) {
|
||||
skipIt(t)
|
||||
tskip.SkipDynamo(t)
|
||||
|
||||
Convey("test with AWS", t, func() {
|
||||
uuid, err := guuid.NewV4()
|
||||
@@ -1000,11 +1001,3 @@ func RunSignatureUploadAndVerificationTests(t *testing.T, cacheDriverParams map[
|
||||
So(resp.StatusCode(), ShouldEqual, http.StatusInternalServerError)
|
||||
})
|
||||
}
|
||||
|
||||
func skipIt(t *testing.T) {
|
||||
t.Helper()
|
||||
|
||||
if os.Getenv("DYNAMODBMOCK_ENDPOINT") == "" {
|
||||
t.Skip("Skipping testing without AWS mock server")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import (
|
||||
. "zotregistry.io/zot/pkg/test/image-utils"
|
||||
"zotregistry.io/zot/pkg/test/mocks"
|
||||
"zotregistry.io/zot/pkg/test/signature"
|
||||
tskip "zotregistry.io/zot/pkg/test/skip"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -658,7 +659,7 @@ func TestLocalTrustStore(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAWSTrustStore(t *testing.T) {
|
||||
skipIt(t)
|
||||
tskip.SkipDynamo(t)
|
||||
|
||||
trustpolicy := "trustpolicy"
|
||||
|
||||
@@ -1336,11 +1337,3 @@ func RunVerificationTests(t *testing.T, dbDriverParams map[string]interface{}) {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func skipIt(t *testing.T) {
|
||||
t.Helper()
|
||||
|
||||
if os.Getenv("DYNAMODBMOCK_ENDPOINT") == "" {
|
||||
t.Skip("Skipping testing without AWS mock server")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2012,6 +2012,7 @@ func TestMandatoryAnnotations(t *testing.T) {
|
||||
|
||||
logFile, err := os.CreateTemp("", "zot-log*.txt")
|
||||
So(err, ShouldBeNil)
|
||||
defer os.Remove(logFile.Name())
|
||||
|
||||
destConfig.Log.Output = logFile.Name()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user