2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-24 07:38:33 +00:00

Change variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY to S3_ACCESS_KEY, S3_SECRET_KEY in tests

This commit is contained in:
Lev Vereshchagin 2021-12-19 14:39:20 +03:00
parent f45620bae0
commit 5e16ed89b6
3 changed files with 14 additions and 14 deletions

View File

@ -8,8 +8,8 @@ def main() -> int:
service_name="s3",
endpoint_url="http://minio:9000",
region_name="us-east-1",
aws_access_key_id=os.getenv("MINIO_ACCESS_KEY"),
aws_secret_access_key=os.getenv("MINIO_SECRET_KEY"),
aws_access_key_id=os.getenv("S3_ACCESS_KEY"),
aws_secret_access_key=os.getenv("S3_SECRET_KEY"),
)
bucket = resource.Bucket("frappe")
db = False

View File

@ -8,8 +8,8 @@ def main() -> int:
service_name="s3",
endpoint_url="http://minio:9000",
region_name="us-east-1",
aws_access_key_id=os.getenv("MINIO_ACCESS_KEY"),
aws_secret_access_key=os.getenv("MINIO_SECRET_KEY"),
aws_access_key_id=os.getenv("S3_ACCESS_KEY"),
aws_secret_access_key=os.getenv("S3_SECRET_KEY"),
)
resource.create_bucket(Bucket="frappe")
return 0

View File

@ -18,8 +18,8 @@ BACKEND_SERVICES = (
"queue-long",
"scheduler",
)
MINIO_ACCESS_KEY = "AKIAIOSFODNN7EXAMPLE"
MINIO_SECRET_KEY = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
S3_ACCESS_KEY = "AKIAIOSFODNN7EXAMPLE"
S3_SECRET_KEY = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
def patch_print():
@ -242,9 +242,9 @@ def prepare_s3_server():
"minio",
"-d",
"-e",
f"MINIO_ACCESS_KEY={MINIO_ACCESS_KEY}",
f"S3_ACCESS_KEY={S3_ACCESS_KEY}",
"-e",
f"MINIO_SECRET_KEY={MINIO_SECRET_KEY}",
f"S3_SECRET_KEY={S3_SECRET_KEY}",
"--network",
"test_default",
"minio/minio",
@ -255,9 +255,9 @@ def prepare_s3_server():
docker_compose(
"exec",
"-e",
f"MINIO_ACCESS_KEY={MINIO_ACCESS_KEY}",
f"S3_ACCESS_KEY={S3_ACCESS_KEY}",
"-e",
f"MINIO_SECRET_KEY={MINIO_SECRET_KEY}",
f"S3_SECRET_KEY={S3_SECRET_KEY}",
"backend",
"/home/frappe/frappe-bench/env/bin/python",
"/tmp/_create_bucket.py",
@ -282,9 +282,9 @@ def push_backup_to_s3():
"--endpoint-url",
"http://minio:9000",
"--aws-access-key-id",
MINIO_ACCESS_KEY,
S3_ACCESS_KEY,
"--aws-secret-access-key",
MINIO_SECRET_KEY,
S3_SECRET_KEY,
)
@ -294,9 +294,9 @@ def check_backup_in_s3():
docker_compose(
"exec",
"-e",
f"MINIO_ACCESS_KEY={MINIO_ACCESS_KEY}",
f"S3_ACCESS_KEY={S3_ACCESS_KEY}",
"-e",
f"MINIO_SECRET_KEY={MINIO_SECRET_KEY}",
f"S3_SECRET_KEY={S3_SECRET_KEY}",
"backend",
"/home/frappe/frappe-bench/env/bin/python",
"/tmp/_check_backup_files.py",