mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Merge pull request #76 from GSA/use-rediss-protocol
Update redis url to use rediss protocol
This commit is contained in:
@@ -15,7 +15,7 @@ def extract_cloudfoundry_config():
|
|||||||
os.environ['SQLALCHEMY_DATABASE_URI'] = vcap_services['aws-rds'][0]['credentials']['uri'].replace('postgres',
|
os.environ['SQLALCHEMY_DATABASE_URI'] = vcap_services['aws-rds'][0]['credentials']['uri'].replace('postgres',
|
||||||
'postgresql')
|
'postgresql')
|
||||||
# Redis config
|
# Redis config
|
||||||
os.environ['REDIS_URL'] = vcap_services['aws-elasticache-redis'][0]['credentials']['uri']
|
os.environ['REDIS_URL'] = vcap_services['aws-elasticache-redis'][0]['credentials']['uri'].replace('redis', 'rediss')
|
||||||
|
|
||||||
# CSV Upload Bucket Name
|
# CSV Upload Bucket Name
|
||||||
bucket_service = find_by_service_name(vcap_services['s3'], f"notifications-api-csv-upload-bucket-{os.environ['DEPLOY_ENV']}")
|
bucket_service = find_by_service_name(vcap_services['s3'], f"notifications-api-csv-upload-bucket-{os.environ['DEPLOY_ENV']}")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ def vcap_services():
|
|||||||
}],
|
}],
|
||||||
'aws-elasticache-redis': [{
|
'aws-elasticache-redis': [{
|
||||||
'credentials': {
|
'credentials': {
|
||||||
'uri': 'redis uri'
|
'uri': 'redis://xxx:6379'
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
's3': [
|
's3': [
|
||||||
@@ -49,6 +49,6 @@ def test_extract_cloudfoundry_config_populates_other_vars(os_environ, vcap_servi
|
|||||||
extract_cloudfoundry_config()
|
extract_cloudfoundry_config()
|
||||||
|
|
||||||
assert os.environ['SQLALCHEMY_DATABASE_URI'] == 'postgresql uri'
|
assert os.environ['SQLALCHEMY_DATABASE_URI'] == 'postgresql uri'
|
||||||
assert os.environ['REDIS_URL'] == 'redis uri'
|
assert os.environ['REDIS_URL'] == 'rediss://xxx:6379'
|
||||||
assert os.environ['CSV_UPLOAD_BUCKET_NAME'] == 'csv-upload-bucket'
|
assert os.environ['CSV_UPLOAD_BUCKET_NAME'] == 'csv-upload-bucket'
|
||||||
assert os.environ['CONTACT_LIST_BUCKET_NAME'] == 'contact-list-bucket'
|
assert os.environ['CONTACT_LIST_BUCKET_NAME'] == 'contact-list-bucket'
|
||||||
|
|||||||
Reference in New Issue
Block a user