Allow test servers to be enabled or disabled easily in the config

This commit is contained in:
Dave Page 2016-10-15 08:44:40 -07:00
parent d0a9b25c57
commit 056ed21148
2 changed files with 14 additions and 12 deletions

View File

@ -20,7 +20,8 @@
"db_port": 5432,
"maintenance_db": "postgres",
"sslmode": "prefer",
"tablespace_path": ""
"tablespace_path": "",
"enabled": true
}
],
"server_update_data": [

View File

@ -69,6 +69,7 @@ def get_config_data():
"""This function reads the server data from config_data"""
server_data = []
for srv in test_setup.config_data['server_credentials']:
if not hasattr(srv, 'enabled') or srv['enabled'] == True:
data = {"name": srv['name'],
"comment": srv['comment'],
"host": srv['host'],