-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flag to exercise django's STORAGES setting on CI #941
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,18 +27,39 @@ API_ROOT = {{ api_root | repr }} | |
{% endif %} | ||
|
||
{% if s3_test | default(false) %} | ||
MEDIA_ROOT: "" | ||
S3_USE_SIGV4 = True | ||
{% if test_storages_compat_layer %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the new one, right so the "compat_layer" is the other one, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, compat layer is the code that enables both, so test compat layer means ensure both branches coverage (testing what was untested). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. Let's not fuzz too much about that name. I hope we will remove it soon again. |
||
STORAGES = { | ||
"default": { | ||
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", | ||
"OPTIONS": { | ||
"access_key": "{{ minio_access_key }}", | ||
"secret_key": "{{ minio_secret_key }}", | ||
"region_name": "eu-central-1", | ||
"addressing_style": "path", | ||
"signature_version": "s3v4", | ||
"bucket_name": "pulp3", | ||
"endpoint_url": "http://minio:9000", | ||
"default_acl": "@none None", | ||
}, | ||
}, | ||
"staticfiles": { | ||
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", | ||
}, | ||
} | ||
{% else %} | ||
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" | ||
MEDIA_ROOT = "" | ||
AWS_ACCESS_KEY_ID = "{{ minio_access_key }}" | ||
AWS_SECRET_ACCESS_KEY = "{{ minio_secret_key }}" | ||
AWS_S3_REGION_NAME = "eu-central-1" | ||
AWS_S3_ADDRESSING_STYLE = "path" | ||
S3_USE_SIGV4 = True | ||
AWS_S3_SIGNATURE_VERSION = "s3v4" | ||
AWS_STORAGE_BUCKET_NAME = "pulp3" | ||
AWS_S3_ENDPOINT_URL = "http://minio:9000" | ||
AWS_DEFAULT_ACL = "@none None" | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if azure_test | default(false) %} | ||
DEFAULT_FILE_STORAGE = "storages.backends.azure_storage.AzureStorage" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add s3 to that name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue this is an implementation detail, but we can also be more concrete and put something like
use_new_storages_on_s3
if you prefer.