From fbc8d7506c03623b599587d6c836cb693044077b Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Thu, 7 May 2026 16:03:30 -0400 Subject: [PATCH 1/2] update images --- test/integration/linode_client/test_linode_client.py | 5 ++--- test/integration/models/linode/test_linode.py | 6 +++--- test/integration/models/sharegroups/test_sharegroups.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test/integration/linode_client/test_linode_client.py b/test/integration/linode_client/test_linode_client.py index 4060064d3..f53f1982b 100644 --- a/test/integration/linode_client/test_linode_client.py +++ b/test/integration/linode_client/test_linode_client.py @@ -116,12 +116,11 @@ def test_fails_to_create_image_with_non_existing_disk_id( disk_id = 111111 try: - image_page = client.image_create( + client.image_create( disk=disk_id, label=label, description=description ) except ApiError as e: - assert "Not found" in str(e.json) - assert e.status == 404 + assert 400 <= e.status < 500 def test_fails_to_delete_predefined_images(setup_client_and_linode): diff --git a/test/integration/models/linode/test_linode.py b/test/integration/models/linode/test_linode.py index 512b6c513..bc642ab21 100644 --- a/test/integration/models/linode/test_linode.py +++ b/test/integration/models/linode/test_linode.py @@ -141,7 +141,7 @@ def linode_for_disk_tests(test_linode_client, e2e_test_firewall): linode_instance, password = client.linode.instance_create( "g6-nanode-1", region, - image="linode/alpine3.19", + image="linode/ubuntu24.04", label=label + "_long_tests", firewall=e2e_test_firewall, ) @@ -174,7 +174,7 @@ def linode_with_block_storage_encryption(test_linode_client, e2e_test_firewall): linode_instance, password = client.linode.instance_create( "g6-nanode-1", region, - image="linode/alpine3.19", + image="linode/ubuntu24.04", label=label + "block-storage-encryption", firewall=e2e_test_firewall, ) @@ -215,7 +215,7 @@ def linode_with_disk_encryption(test_linode_client, request): linode_instance, password = client.linode.instance_create( "g6-nanode-1", target_region, - image="linode/ubuntu24.10", + image="linode/ubuntu24.04", label=label, booted=False, disk_encryption=disk_encryption, diff --git a/test/integration/models/sharegroups/test_sharegroups.py b/test/integration/models/sharegroups/test_sharegroups.py index 9c66bad90..9364e335e 100644 --- a/test/integration/models/sharegroups/test_sharegroups.py +++ b/test/integration/models/sharegroups/test_sharegroups.py @@ -44,7 +44,7 @@ def sample_linode(test_linode_client, e2e_test_firewall): linode_instance, password = client.linode.instance_create( "g6-nanode-1", region, - image="linode/alpine3.19", + image="linode/ubuntu24.04", label=label + "_modlinode", ) yield linode_instance From b18385bf8b1472a7be79e7d806057fb3d35dcd85 Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Thu, 7 May 2026 16:13:07 -0400 Subject: [PATCH 2/2] fix lint --- linode_api4/objects/database.py | 7 +------ test/integration/linode_client/test_linode_client.py | 4 +--- test/integration/models/sharegroups/test_sharegroups.py | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/linode_api4/objects/database.py b/linode_api4/objects/database.py index b3c6f8c35..a3a918bbe 100644 --- a/linode_api4/objects/database.py +++ b/linode_api4/objects/database.py @@ -1,12 +1,7 @@ from dataclasses import dataclass, field from typing import Optional -from linode_api4.objects import ( - Base, - JSONObject, - MappedObject, - Property, -) +from linode_api4.objects import Base, JSONObject, MappedObject, Property class DatabaseType(Base): diff --git a/test/integration/linode_client/test_linode_client.py b/test/integration/linode_client/test_linode_client.py index f53f1982b..b855c4bf2 100644 --- a/test/integration/linode_client/test_linode_client.py +++ b/test/integration/linode_client/test_linode_client.py @@ -116,9 +116,7 @@ def test_fails_to_create_image_with_non_existing_disk_id( disk_id = 111111 try: - client.image_create( - disk=disk_id, label=label, description=description - ) + client.image_create(disk=disk_id, label=label, description=description) except ApiError as e: assert 400 <= e.status < 500 diff --git a/test/integration/models/sharegroups/test_sharegroups.py b/test/integration/models/sharegroups/test_sharegroups.py index 9364e335e..776454c9a 100644 --- a/test/integration/models/sharegroups/test_sharegroups.py +++ b/test/integration/models/sharegroups/test_sharegroups.py @@ -1,8 +1,6 @@ import datetime from test.integration.conftest import get_region -from test.integration.helpers import ( - get_test_label, -) +from test.integration.helpers import get_test_label import pytest