Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def test_linode_client():
token,
base_url=api_url,
ca_path=api_ca_file,
retry_statuses=[504],
)
return client

Expand Down
16 changes: 14 additions & 2 deletions test/integration/models/linode/test_linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Type,
)
from linode_api4.objects.linode import InstanceDiskEncryptionType, MigrationType
from linode_api4.objects.region import RegionAvailabilityEntry


@pytest.fixture(scope="session")
Expand Down Expand Up @@ -119,12 +120,23 @@ def linode_and_vpc_for_legacy_interface_tests_offline(
@pytest.fixture(scope="session")
def linode_for_vpu_tests(test_linode_client, e2e_test_firewall):
client = test_linode_client
region = "us-lax"
vpu_type = "g1-accelerated-netint-vpu-t1u1-s"

availability = client.regions.availability(
RegionAvailabilityEntry.filters.plan == vpu_type
)

region = next(
(entry.region for entry in availability if entry.available), None
)

if region is None:
pytest.skip("No VPU capacity is currently available")

label = get_test_label(length=8)

linode_instance = client.linode.instance_create(
"g1-accelerated-netint-vpu-t1u1-s",
vpu_type,
region,
image="linode/debian12",
label=label,
Expand Down