X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/97e8290d683afff06fe2e9a4cec522a871a96df3..91aeea6d741f2bec6ecdc32d24537cf0f2a7328a:/sdk/python/tests/run_test_server.py?ds=inline diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index 93be8dc21f..734bb04270 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -662,11 +662,21 @@ def setup_config(): keep_web_dl_port = find_available_port() keep_web_dl_external_port = find_available_port() - dbconf = os.path.join(os.environ["CONFIGSRC"], "config.yml") - - print("Getting config from %s" % dbconf, file=sys.stderr) - - pgconnection = yaml.safe_load(open(dbconf))["Clusters"]["zzzzz"]["PostgreSQL"]["Connection"] + configsrc = os.environ.get("CONFIGSRC", None) + if configsrc: + clusterconf = os.path.join(configsrc, "config.yml") + print("Getting config from %s" % clusterconf, file=sys.stderr) + pgconnection = yaml.safe_load(open(clusterconf))["Clusters"]["zzzzz"]["PostgreSQL"]["Connection"] + else: + # assume "arvados-server install -type test" has set up the + # conventional db credentials + pgconnection = { + "client_encoding": "utf8", + "host": "localhost", + "dbname": "arvados_test", + "user": "arvados", + "password": "insecure_arvados_test", + } localhost = "127.0.0.1" services = {