Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions test/integration/linode_client/test_linode_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

@mawilk90 mawilk90 May 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spotted that API returns [403] Unauthorized for disk_id = 111111 or 111112 or 111122 etc., but not for 122222 or 123456 (then the error is [404] Not Found). IMO, it's a bit strange and inconsistent. Does it make sense to use e.g. disk_id = 123456 to get [404] Not Found as before and instead of possible range of error codes (400 <= e.status < 500) and clarify this behaviour with API Team?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, not sure why API returns inconsistent error message. I did the error code range check just to make sure it's a client error, so it can tolerates the small backend divergence like this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will ask API Team about that on Monday

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, there will be a bug ticket created for this by API Team



def test_fails_to_delete_predefined_images(setup_client_and_linode):
Expand Down
6 changes: 3 additions & 3 deletions test/integration/models/linode/test_linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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,
)
Expand Down Expand Up @@ -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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why downgrade?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24.04 is LTS

label=label,
booted=False,
disk_encryption=disk_encryption,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/models/sharegroups/test_sharegroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading