# HG changeset patch # User Sylvain Thénault # Date 1463742441 -7200 # Node ID 1a3a0ac2b41ddc705d7c7af25859c34fa33d9241 # Parent 84e2a1121f4b5fcbb8a9c068efc6024002949341 [devtools] Set dumb value for postgres's db-host to avoid unexpected connection to a local server Currently, if something goes wrong (eg config built before call to startpgcluster) while a pg server is running on localhost, it may connect to this server and run the test in there unexepectedly. diff -r 84e2a1121f4b -r 1a3a0ac2b41d cubicweb/devtools/__init__.py --- a/cubicweb/devtools/__init__.py Fri May 20 12:05:29 2016 +0200 +++ b/cubicweb/devtools/__init__.py Fri May 20 13:07:21 2016 +0200 @@ -97,6 +97,9 @@ DEFAULT_PSQL_SOURCES['system']['db-driver'] = 'postgres' DEFAULT_PSQL_SOURCES['system']['db-user'] = text_type(getpass.getuser()) DEFAULT_PSQL_SOURCES['system']['db-password'] = None +# insert a dumb value as db-host to avoid unexpected connection to local server +DEFAULT_PSQL_SOURCES['system']['db-host'] = 'REPLACEME' + def turn_repo_off(repo): """ Idea: this is less costly than a full re-creation of the repo object.