Integration tests for support Linode integration with alerts#669
Conversation
There was a problem hiding this comment.
Pull request overview
Adds integration test coverage for Linode Instance “alerts” behavior in the Python SDK, focusing on listing, rebuilding, updating, cloning, and validating error behavior when mixing legacy and ACLP alerts.
Changes:
- Add a new integration test to verify alerts are present when listing Linodes.
- Extend the rebuild integration test to assert alerts fields are populated.
- Add workflow/error-path integration tests for updating alerts and validating legacy vs ACLP alert incompatibilities.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return type in str(linode.type) | ||
|
|
||
|
|
||
| def test_get_linodes_verify_alerts(test_linode_client, create_linode): |
There was a problem hiding this comment.
create_linode is not used in this test. Probably can be removed.
| new_linode.delete() | ||
|
|
||
|
|
||
| def test_try_to_update_linode_alerts_legacy_and_aclp_at_the_same_time( |
There was a problem hiding this comment.
We can consider not testing this case, because this behavior will be removed in a following api change. I will send the doc to you.
| assert linode.status == "running" | ||
|
|
||
|
|
||
| def test_linode_alerts_workflow(test_linode_client, create_linode): |
There was a problem hiding this comment.
Can we add a test case to creat linode with aclp alerts? Adding system_alerts should be good
📝 Description
Integration tests for support Linode integration with alerts
✔️ How to Test
make TEST_CASE=test_get_linodes_verify_alerts test-int
make TEST_CASE=test_linode_rebuild test-int
make TEST_CASE=test_linode_alerts_workflow test-int
make TEST_CASE=test_try_to_update_linode_alerts_legacy_and_aclp_at_the_same_time test-int