mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
Test passes now
It runs the command successfully. Doesn't try to attach it to the
pageserver on it yet
BUILD_TYPE=debug DEFAULT_PG_VERSION=16 poetry run pytest --preserve-database-files test_runner/regress/test_pg_import.py
This commit is contained in:
@@ -22,8 +22,8 @@ class ImportCli(AbstractNeonCli):
|
||||
|
||||
COMMAND = "import"
|
||||
|
||||
def run_import(self, pgdatadir: Path, dest_dir: Path):
|
||||
res = self.raw_cli([str(pgdatadir), str(dest_dir)])
|
||||
def run_import(self, pgdatadir: Path, dest_dir: Path, tenant_id: TenantId, timeline_id: TimelineId):
|
||||
res = self.raw_cli(["--tenant-id", str(tenant_id), "--timeline-id", str(timeline_id), str(pgdatadir), str(dest_dir)])
|
||||
res.check_returncode()
|
||||
|
||||
|
||||
@@ -50,10 +50,11 @@ def test_pg_import(test_output_dir, pg_bin, vanilla_pg, neon_env_builder):
|
||||
tenant_id = TenantId.generate()
|
||||
timeline_id = TimelineId.generate()
|
||||
|
||||
dst_path = env.pageserver_remote_storage.root
|
||||
tline_path = env.pageserver_remote_storage.timeline_path(tenant_id, timeline_id)
|
||||
tline_path.mkdir(parents=True)
|
||||
|
||||
cli = ImportCli(env)
|
||||
cli.run_import(vanilla_pg.pgdatadir, tline_path)
|
||||
cli.run_import(vanilla_pg.pgdatadir, dst_path, tenant_id=tenant_id, timeline_id=timeline_id)
|
||||
|
||||
# TODO: tell pageserver / storage controller that the tenant/timeline now exists
|
||||
|
||||
Reference in New Issue
Block a user