Skip to content

Commit

Permalink
test: use aux file v2 policy by default
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh committed Jun 26, 2024
1 parent 3118c24 commit d1f7a66
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ def create_tenant(
shard_stripe_size: Optional[int] = None,
placement_policy: Optional[str] = None,
set_default: bool = False,
aux_file_v2: Optional[AuxFileStore] = None,
aux_file_policy: Optional[AuxFileStore] = None,
) -> Tuple[TenantId, TimelineId]:
"""
Creates a new tenant, returns its id and its initial timeline's id.
Expand All @@ -1629,14 +1629,15 @@ def create_tenant(
)
)

if aux_file_v2 is AuxFileStore.V2:
if aux_file_policy is AuxFileStore.V2:
args.extend(["-c", "switch_aux_file_policy:v2"])

if aux_file_v2 is AuxFileStore.V1:
elif aux_file_policy is AuxFileStore.V1:
args.extend(["-c", "switch_aux_file_policy:v1"])

if aux_file_v2 is AuxFileStore.CrossValidation:
elif aux_file_policy is AuxFileStore.CrossValidation:
args.extend(["-c", "switch_aux_file_policy:cross-validation"])
else:
# use aux file v2 if the policy is not specified
args.extend(["-c", "switch_aux_file_policy:v2"])

if set_default:
args.append("--set-default")
Expand Down

0 comments on commit d1f7a66

Please sign in to comment.