mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 13:32:57 +00:00
[test_runner] psql should be oblivious to user's preferences
This makes psql ignore $HOME/.psqlrc
This commit is contained in:
@@ -1031,12 +1031,18 @@ def check_restored_datadir_content(zenith_cli: ZenithCli, test_output_dir: str,
|
||||
pg.stop()
|
||||
|
||||
# Take a basebackup from pageserver
|
||||
restored_dir_path = os.path.join(test_output_dir, "{}_restored_datadir".format(pg.branch))
|
||||
restored_dir_path = os.path.join(test_output_dir, f"{pg.branch}_restored_datadir")
|
||||
mkdir_if_needed(restored_dir_path)
|
||||
|
||||
cmd = f"psql -h localhost -p {pageserver_pg_port} -c 'basebackup {pg.tenant_id} {timeline}' | tar -x -C {restored_dir_path}"
|
||||
psql_path = os.path.join(pg.pg_bin.pg_bin_path, 'psql')
|
||||
|
||||
cmd = os.path.join(pg.pg_bin.pg_bin_path, cmd)
|
||||
cmd = rf"""
|
||||
{psql_path} \
|
||||
--no-psqlrc \
|
||||
postgres://localhost:{pageserver_pg_port} \
|
||||
-c 'basebackup {pg.tenant_id} {timeline}' \
|
||||
| tar -x -C {restored_dir_path}
|
||||
"""
|
||||
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user