From 243c0632ed567588e3c816a06162e85f579db56c Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Fri, 31 Mar 2017 17:18:18 +0100 Subject: [PATCH] add test --- tests/app/test_cloudfoundry_config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/app/test_cloudfoundry_config.py b/tests/app/test_cloudfoundry_config.py index f1a8bf34e..acd57796e 100644 --- a/tests/app/test_cloudfoundry_config.py +++ b/tests/app/test_cloudfoundry_config.py @@ -150,6 +150,15 @@ def test_notify_config(): assert os.environ['PERFORMANCE_PLATFORM_TOKEN'] == 'performance platform token' +@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ') +def test_notify_config_if_perf_platform_not_set(cloudfoundry_config): + del cloudfoundry_config['user-provided'][0]['credentials']['performance_platform_token'] + + set_config_env_vars(cloudfoundry_config) + + assert os.environ['PERFORMANCE_PLATFORM_TOKEN'] == '' + + @pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ') def test_aws_config(): extract_cloudfoundry_config()