[Greater-commits] r316 - trunk/GREAT-ER-DB/impl/postgresql/test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 30 11:37:34 CEST 2011
Author: bricks
Date: 2011-06-30 11:37:34 +0200 (Thu, 30 Jun 2011)
New Revision: 316
Modified:
trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py
Log:
generater correct and valid pg_hba.conf config file
also require passwords as default
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py 2011-06-30 09:30:41 UTC (rev 315)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py 2011-06-30 09:37:34 UTC (rev 316)
@@ -307,7 +307,7 @@
conn.close()
return rows_affected
- def require_authentication(self, required):
+ def require_authentication(self, required=True):
"""Switch authentication requirements on or off
When started for the first time no passwords are required. Some
@@ -318,9 +318,11 @@
tearDown method or in a finally: block.
"""
if required:
- contents = "local all password\n"
+ contents = "local all all md5\n"
+ contents += "host all all 127.0.0.1/32 md5\n"
+ contents += "host all all ::1/128 md5\n"
else:
- contents = "local all trust\n"
+ contents = "local all all trust\n"
f = open(os.path.join(self.dbdir, "pg_hba.conf"), "w")
f.write(contents)
f.close()
More information about the Greater-commits
mailing list