From 9ba9965110c670f093f6e8ad666d581c4916acc0 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 17 Oct 2023 19:58:55 +0100 Subject: [PATCH] tests: remove test_ignored_tenant_stays_broken_without_metadata This test exercised a local storage only path --- test_runner/regress/test_tenant_detach.py | 41 ----------------------- 1 file changed, 41 deletions(-) diff --git a/test_runner/regress/test_tenant_detach.py b/test_runner/regress/test_tenant_detach.py index 5bddf2b07e..49d92863aa 100644 --- a/test_runner/regress/test_tenant_detach.py +++ b/test_runner/regress/test_tenant_detach.py @@ -643,47 +643,6 @@ def test_ignored_tenant_download_missing_layers(neon_env_builder: NeonEnvBuilder ensure_test_data(data_id, data_secret, endpoint) -# Tests that it's possible to `load` broken tenants: -# * `ignore` a tenant -# * removes its `metadata` file locally -# * `load` the same tenant -# * ensure that it's status is `Broken` -def test_ignored_tenant_stays_broken_without_metadata(neon_env_builder: NeonEnvBuilder): - neon_env_builder.enable_pageserver_remote_storage(RemoteStorageKind.LOCAL_FS) - env = neon_env_builder.init_start() - pageserver_http = env.pageserver.http_client() - env.endpoints.create_start("main") - - tenant_id = env.initial_tenant - timeline_id = env.initial_timeline - - # Attempts to connect from compute to pageserver while the tenant is - # temporarily detached produces these errors in the pageserver log. - env.pageserver.allowed_errors.append(f".*Tenant {tenant_id} not found.*") - env.pageserver.allowed_errors.append( - f".*Tenant {tenant_id} will not become active\\. Current state: (Broken|Stopping).*" - ) - - # ignore the tenant and remove its metadata - pageserver_http.tenant_ignore(tenant_id) - timeline_dir = env.pageserver.timeline_dir(tenant_id, timeline_id) - metadata_removed = False - for dir_entry in timeline_dir.iterdir(): - if dir_entry.name == "metadata": - # Looks like a layer file. Remove it - dir_entry.unlink() - metadata_removed = True - assert metadata_removed, f"Failed to find metadata file in {timeline_dir}" - - env.pageserver.allowed_errors.append( - f".*{tenant_id}.*: load failed.*: failed to load metadata.*" - ) - - # now, load it from the local files and expect it to be broken due to inability to load tenant files into memory - pageserver_http.tenant_load(tenant_id=tenant_id) - wait_until_tenant_state(pageserver_http, tenant_id, "Broken", 5) - - # Tests that attach is never working on a tenant, ignored or not, as long as it's not absent locally # Similarly, tests that it's not possible to schedule a `load` for tenat that's not ignored. def test_load_attach_negatives(neon_env_builder: NeonEnvBuilder):