Skip to content

Commit

Permalink
test_compatibility: make it use initdb.tar.zst
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin authored and tristan957 committed Dec 13, 2023
1 parent 904dff5 commit 0cd49ca
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test_runner/regress/test_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,24 @@ def check_neon_works(env: NeonEnv, test_output_dir: Path, sql_dump_path: Path, r
timeline_id = env.initial_timeline
pg_version = env.pg_version

shutil.rmtree(repo_dir / "local_fs_remote_storage")
# Delete all files from local_fs_remote_storage except initdb.tar.zst,
# the file is required for `timeline_create` with `existing_initdb_timeline_id`.
#
# TODO: switch to Path.walk() in Python 3.12
# for dirpath, _dirnames, filenames in (repo_dir / "local_fs_remote_storage").walk():
for dirpath, _dirnames, filenames in os.walk(repo_dir / "local_fs_remote_storage"):
for filename in filenames:
if filename != "initdb.tar.zst":
(Path(dirpath) / filename).unlink()

timeline_delete_wait_completed(pageserver_http, tenant_id, timeline_id)
pageserver_http.timeline_create(pg_version, tenant_id, timeline_id)
pageserver_http.timeline_create(
pg_version=pg_version,
tenant_id=tenant_id,
new_timeline_id=timeline_id,
existing_initdb_timeline_id=timeline_id,
)

pg_bin.run_capture(
["pg_dumpall", f"--dbname={connstr}", f"--file={test_output_dir / 'dump-from-wal.sql'}"]
)
Expand Down

1 comment on commit 0cd49ca

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2252 tests run: 2161 passed, 0 failed, 91 skipped (full report)


Flaky tests (5)

Postgres 16

Postgres 15

  • test_statvfs_pressure_min_avail_bytes: debug
  • test_emergency_mode: release
  • test_timetravel: debug

Postgres 14

  • test_deletion_queue_recovery[no-validate-keep]: debug

Code coverage (full report)

  • functions: 55.2% (9434 of 17091 functions)
  • lines: 82.3% (54548 of 66304 lines)

The comment gets automatically updated with the latest test results
0cd49ca at 2023-12-13T22:02:35.150Z :recycle:

Please sign in to comment.