tests: update for tenant generations (#5449)

## Problem

Some existing tests are written in a way that's incompatible with tenant
generations.

## Summary of changes

Update all the tests that need updating: this is things like calling
through the NeonPageserver.tenant_attach helper to get a generation
number, instead of calling directly into the pageserver API. There are
various more subtle cases.
This commit is contained in:
John Spray
2023-12-07 12:27:16 +00:00
committed by GitHub
parent f9401fdd31
commit e89e41f8ba
27 changed files with 424 additions and 317 deletions

View File

@@ -266,9 +266,7 @@ class NeonPageserverHttpClient(requests.Session):
def tenant_create(self, new_tenant_id: uuid.UUID, ok_if_exists):
res = self.post(
f"http://{self.host}:{self.port}/v1/tenant",
json={
"new_tenant_id": new_tenant_id.hex,
},
json={"new_tenant_id": new_tenant_id.hex, "generation": 1},
)
if res.status_code == 409: