fix(test): use correct aws region for dynamodb (#1093)

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu
2023-01-09 19:04:56 +02:00
committed by GitHub
parent 08a8b3d44c
commit f69b104838
2 changed files with 7 additions and 6 deletions
+5 -4
View File
@@ -45,6 +45,7 @@ var (
errorText = "new s3 error"
errS3 = errors.New(errorText)
zotStorageTest = "zot-storage-test"
s3Region = "us-east-2"
)
func cleanupStorage(store driver.StorageDriver, name string) {
@@ -94,7 +95,7 @@ func createObjectsStore(rootDir string, cacheDir string, dedupe bool) (
storageDriverParams := map[string]interface{}{
"rootDir": rootDir,
"name": "s3",
"region": "us-east-2",
"region": s3Region,
"bucket": bucket,
"regionendpoint": endpoint,
"accesskey": "minioadmin",
@@ -145,7 +146,7 @@ func createObjectsStoreDynamo(rootDir string, cacheDir string, dedupe bool, tabl
storageDriverParams := map[string]interface{}{
"rootDir": rootDir,
"name": "s3",
"region": "us-east-2",
"region": s3Region,
"bucket": bucket,
"regionendpoint": endpoint,
"accesskey": "minioadmin",
@@ -176,7 +177,7 @@ func createObjectsStoreDynamo(rootDir string, cacheDir string, dedupe bool, tabl
cacheDriver, _ = storage.Create("dynamodb", cache.DynamoDBDriverParameters{
Endpoint: os.Getenv("DYNAMODBMOCK_ENDPOINT"),
Region: os.Getenv("us-east-2"),
Region: s3Region,
TableName: tableName,
}, log)
@@ -688,7 +689,7 @@ func TestNegativeCasesObjectsStorage(t *testing.T) {
StorageDriver: map[string]interface{}{
"rootDir": "/a",
"name": "s3",
"region": "us-east-2",
"region": s3Region,
"bucket": bucket,
"regionendpoint": endpoint,
"accesskey": "minioadmin",