Sfoglia il codice sorgente

Fix postgres tests

- take postgres superuser from user iff it is not in config
version-14
jibin jose 6 anni fa
parent
commit
f1044afe8c
2 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +3
    -0
      frappe/database/postgres/setup_db.py
  2. +1
    -0
      test_sites/test_site_postgres/site_config.json

+ 3
- 0
frappe/database/postgres/setup_db.py Vedi File

@@ -35,6 +35,9 @@ def setup_help_database(help_db_name):
def get_root_connection(root_login=None, root_password=None): def get_root_connection(root_login=None, root_password=None):
import getpass import getpass
if not frappe.local.flags.root_connection: if not frappe.local.flags.root_connection:
if not root_login:
root_login = frappe.conf.get("root_login") or None

if not root_login: if not root_login:
root_login = input("Enter postgres super user: ") root_login = input("Enter postgres super user: ")




+ 1
- 0
test_sites/test_site_postgres/site_config.json Vedi File

@@ -7,6 +7,7 @@
"mail_login": "test@example.com", "mail_login": "test@example.com",
"mail_password": "test", "mail_password": "test",
"admin_password": "admin", "admin_password": "admin",
"root_login": "postgres",
"root_password": "travis", "root_password": "travis",
"run_selenium_tests": 1, "run_selenium_tests": 1,
"host_name": "http://test_site_postgres:8000" "host_name": "http://test_site_postgres:8000"


Caricamento…
Annulla
Salva