fix test cases

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2023-05-16 16:02:18 -04:00
parent 1d47833304
commit 2e9ca129bc
3 changed files with 20 additions and 9 deletions

View File

@@ -159,6 +159,8 @@ 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)