File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ def test_linode_client():
286286 token ,
287287 base_url = api_url ,
288288 ca_path = api_ca_file ,
289+ retry_statuses = [504 ],
289290 )
290291 return client
291292
Original file line number Diff line number Diff line change 2323 Type ,
2424)
2525from linode_api4 .objects .linode import InstanceDiskEncryptionType , MigrationType
26+ from linode_api4 .objects .region import RegionAvailabilityEntry
2627
2728
2829@pytest .fixture (scope = "session" )
@@ -119,12 +120,23 @@ def linode_and_vpc_for_legacy_interface_tests_offline(
119120@pytest .fixture (scope = "session" )
120121def linode_for_vpu_tests (test_linode_client , e2e_test_firewall ):
121122 client = test_linode_client
122- region = "us-lax"
123+ vpu_type = "g1-accelerated-netint-vpu-t1u1-s"
124+
125+ availability = client .regions .availability (
126+ RegionAvailabilityEntry .filters .plan == vpu_type
127+ )
128+
129+ region = next (
130+ (entry .region for entry in availability if entry .available ), None
131+ )
132+
133+ if region is None :
134+ pytest .skip ("No VPU capacity is currently available" )
123135
124136 label = get_test_label (length = 8 )
125137
126138 linode_instance = client .linode .instance_create (
127- "g1-accelerated-netint-vpu-t1u1-s" ,
139+ vpu_type ,
128140 region ,
129141 image = "linode/debian12" ,
130142 label = label ,
You can’t perform that action at this time.
0 commit comments