Update Images in integration tests#694
Open
yec-akamai wants to merge 2 commits intolinode:devfrom
Open
Conversation
zliang-akamai
previously approved these changes
May 7, 2026
zliang-akamai
approved these changes
May 7, 2026
mawilk90
reviewed
May 8, 2026
| except ApiError as e: | ||
| assert "Not found" in str(e.json) | ||
| assert e.status == 404 | ||
| assert 400 <= e.status < 500 |
Contributor
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
I will ask API Team about that on Monday
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Fixing integration test issues seeing in workflow: https://github.com/linode/linode_api4-python/actions/runs/25501433562/job/74835124597?pr=691
Update to use LTS images in test cases instead of invalid ones. Change the error code assertion to match the API change.
✔️ How to Test