Check file sizes

This commit is contained in:
Bojan Serafimov
2022-06-18 11:14:21 -04:00
parent 443e409950
commit 010132dbb0

View File

@@ -171,3 +171,12 @@ def test_import_from_pageserver(test_output_dir, pg_bin, vanilla_pg, neon_env_bu
# Check it worked
pg = env.postgres.create_start(node_name, tenant_id=tenant)
assert pg.safe_psql('select count(*) from tbl') == [(num_rows, )]
# Take another fullbackup
query = f"fullbackup { tenant.hex} {timeline} {lsn}"
cmd = ["psql", "--no-psqlrc", env.pageserver.connstr(), "-c", query]
result_basepath = pg_bin.run_capture(cmd, env=psql_env)
new_tar_output_file = result_basepath + ".stdout"
# Check it's the same as the first fullbackup
assert os.path.getsize(tar_output_file) == os.path.getsize(new_tar_output_file)