From 38602ef5804186c543c4fc4dd487a52bbaedee1f Mon Sep 17 00:00:00 2001 From: Alex Chi Z Date: Tue, 16 May 2023 17:44:04 -0400 Subject: [PATCH] Update test_runner/regress/test_tenants.py Co-authored-by: Alexander Bayandin --- test_runner/regress/test_tenants.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test_runner/regress/test_tenants.py b/test_runner/regress/test_tenants.py index af5f622838..0be70be4c0 100644 --- a/test_runner/regress/test_tenants.py +++ b/test_runner/regress/test_tenants.py @@ -420,11 +420,8 @@ def test_pageserver_create_tenants_fail( client = env.pageserver.http_client() client.configure_failpoints(("tenant-create-fail", "return")) tenant_id = TenantId("deadbeefdeadbeefdeadbeefdeadbeef") - try: + with pytest.raises(PageserverApiException, match=f"failpoint: tenant-create-fail"): client.tenant_create(tenant_id) - except Exception as e: - exception_string = str(e) - assert "tenant-create-fail" in exception_string, "should reach failpoint" path = Path(env.repo_dir) / "tenants" / str(tenant_id) assert not path.exists()