From 04ec8bd7dea6f28cc933184981254e49efbc5594 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 12 Sep 2024 13:52:14 +0300 Subject: [PATCH] test: Attach the tenant, start endpoint on it Doesn't work yet, I think because index_part.json is missing --- test_runner/regress/test_pg_import.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test_runner/regress/test_pg_import.py b/test_runner/regress/test_pg_import.py index 7410b1b30d..10248f77e4 100644 --- a/test_runner/regress/test_pg_import.py +++ b/test_runner/regress/test_pg_import.py @@ -58,3 +58,16 @@ def test_pg_import(test_output_dir, pg_bin, vanilla_pg, neon_env_builder): 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 + env.pageserver.tenant_attach( + tenant_id, + generation=100, + override_storage_controller_generation=True, + ) + + env.neon_cli.map_branch("imported", tenant_id, timeline_id) + + endpoint = env.endpoints.create_start(branch_name="imported", tenant_id=tenant_id) + conn = endpoint.connect() + cur = conn.cursor() + + assert endpoint.safe_psql("select count(*) from t") == [(300000,)]