mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 06:52:06 -05:00
Create s3 buckets via terraform and bind to app
This commit is contained in:
@@ -19,13 +19,30 @@ def vcap_services():
|
||||
'uri': 'redis uri'
|
||||
}
|
||||
}],
|
||||
's3': [
|
||||
{
|
||||
'name': 'notifications-api-csv-upload-bucket-test',
|
||||
'credentials': {
|
||||
'bucket': 'csv-upload-bucket'
|
||||
}
|
||||
},
|
||||
{
|
||||
'name': 'notifications-api-contact-list-bucket-test',
|
||||
'credentials': {
|
||||
'bucket': 'contact-list-bucket'
|
||||
}
|
||||
}
|
||||
],
|
||||
'user-provided': []
|
||||
}
|
||||
|
||||
|
||||
def test_extract_cloudfoundry_config_populates_other_vars(os_environ, vcap_services):
|
||||
os.environ['DEPLOY_ENV'] = 'test'
|
||||
os.environ['VCAP_SERVICES'] = json.dumps(vcap_services)
|
||||
extract_cloudfoundry_config()
|
||||
|
||||
assert os.environ['SQLALCHEMY_DATABASE_URI'] == 'postgresql uri'
|
||||
assert os.environ['REDIS_URL'] == 'redis uri'
|
||||
assert os.environ['CSV_UPLOAD_BUCKET_NAME'] == 'csv-upload-bucket'
|
||||
assert os.environ['CONTACT_LIST_BUCKET_NAME'] == 'contact-list-bucket'
|
||||
|
||||
Reference in New Issue
Block a user