2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-24 15:48:34 +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", service_name="s3",
endpoint_url="http://minio:9000", endpoint_url="http://minio:9000",
region_name="us-east-1", region_name="us-east-1",
aws_access_key_id=os.getenv("MINIO_ACCESS_KEY"), aws_access_key_id=os.getenv("S3_ACCESS_KEY"),
aws_secret_access_key=os.getenv("MINIO_SECRET_KEY"), aws_secret_access_key=os.getenv("S3_SECRET_KEY"),
) )
bucket = resource.Bucket("frappe") bucket = resource.Bucket("frappe")
db = False db = False

View File

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

View File

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