Updated cf conf unit tests

This commit is contained in:
Ken Tsang
2017-03-31 16:50:30 +01:00
parent 316d8fdb0d
commit d5e8cb3354
2 changed files with 3 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ def extract_notify_config(notify_config):
os.environ['ADMIN_CLIENT_SECRET'] = notify_config['credentials']['admin_client_secret'] os.environ['ADMIN_CLIENT_SECRET'] = notify_config['credentials']['admin_client_secret']
os.environ['SECRET_KEY'] = notify_config['credentials']['secret_key'] os.environ['SECRET_KEY'] = notify_config['credentials']['secret_key']
os.environ['DANGEROUS_SALT'] = notify_config['credentials']['dangerous_salt'] os.environ['DANGEROUS_SALT'] = notify_config['credentials']['dangerous_salt']
os.environ['PERFORMANCE_PLATFORM_ENABLED'] = notify_config['credentials']['performance_platform_enabled'] os.environ['PERFORMANCE_PLATFORM_TOKEN'] = notify_config['credentials'].get('performance_platform_token')
def extract_notify_aws_config(aws_config): def extract_notify_aws_config(aws_config):

View File

@@ -16,6 +16,7 @@ def notify_config():
'admin_client_secret': 'admin client secret', 'admin_client_secret': 'admin client secret',
'secret_key': 'secret key', 'secret_key': 'secret key',
'dangerous_salt': 'dangerous salt', 'dangerous_salt': 'dangerous salt',
'performance_platform_token': 'performance platform token'
} }
} }
@@ -146,6 +147,7 @@ def test_notify_config():
assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret' assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret'
assert os.environ['SECRET_KEY'] == 'secret key' assert os.environ['SECRET_KEY'] == 'secret key'
assert os.environ['DANGEROUS_SALT'] == 'dangerous salt' assert os.environ['DANGEROUS_SALT'] == 'dangerous salt'
assert os.environ['PERFORMANCE_PLATFORM_TOKEN'] == 'performance platform token'
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ') @pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')