fix python style

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2023-05-16 16:06:31 -04:00
parent 2e9ca129bc
commit eab349839c
2 changed files with 4 additions and 12 deletions

View File

@@ -159,8 +159,6 @@ class PageserverHttpClient(requests.Session):
self.verbose_error(res)
if res.status_code == 409:
raise Exception(f"could not create tenant: already exists for id {new_tenant_id}")
if not res.ok:
raise Exception(f"could not create tenant: {res.text}")
new_tenant_id = res.json()
assert isinstance(new_tenant_id, str)
return TenantId(new_tenant_id)

View File

@@ -398,6 +398,7 @@ def test_pageserver_with_empty_tenants(
tenant_broken_count == 1
), f"Tenant {tenant_without_timelines_dir} should have metric as broken"
# Check that empty tenants work with or without the remote storage
@pytest.mark.parametrize(
"remote_storage_kind", available_remote_storages() + [RemoteStorageKind.NOOP]
@@ -412,16 +413,9 @@ def test_pageserver_create_tenants_fail(
env = neon_env_builder.init_start()
env.pageserver.allowed_errors.append(
".*tenant-create-fail.*"
)
env.pageserver.allowed_errors.append(
".*Tenant is already in Broken state.*"
)
env.pageserver.allowed_errors.append(
".*could not load tenant.*"
)
env.pageserver.allowed_errors.append(".*tenant-create-fail.*")
env.pageserver.allowed_errors.append(".*Tenant is already in Broken state.*")
env.pageserver.allowed_errors.append(".*could not load tenant.*")
client = env.pageserver.http_client()
client.configure_failpoints(("tenant-create-fail", "return"))