mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 22:39:43 -04:00
Compare commits
1 Commits
jim/062522
...
pyup-sched
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f68b9a711 |
@@ -14,7 +14,8 @@ def extract_cloudfoundry_config():
|
||||
|
||||
def set_config_env_vars(vcap_services):
|
||||
# Postgres config
|
||||
os.environ['SQLALCHEMY_DATABASE_URI'] = vcap_services['postgres'][0]['credentials']['uri']
|
||||
os.environ['SQLALCHEMY_DATABASE_URI'] = vcap_services['postgres'][0]['credentials']['uri'].replace('postgres',
|
||||
'postgresql')
|
||||
|
||||
vcap_application = json.loads(os.environ['VCAP_APPLICATION'])
|
||||
os.environ['NOTIFY_ENVIRONMENT'] = vcap_application['space_name']
|
||||
|
||||
@@ -37,7 +37,7 @@ def cloudfoundry_environ(os_environ, cloudfoundry_config):
|
||||
def test_extract_cloudfoundry_config_populates_other_vars(cloudfoundry_environ):
|
||||
extract_cloudfoundry_config()
|
||||
|
||||
assert os.environ['SQLALCHEMY_DATABASE_URI'] == 'postgres uri'
|
||||
assert os.environ['SQLALCHEMY_DATABASE_URI'] == 'postgresql uri'
|
||||
assert os.environ['NOTIFY_ENVIRONMENT'] == '🚀🌌'
|
||||
assert os.environ['NOTIFY_LOG_PATH'] == '/home/vcap/logs/app.log'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user