TPT-4564: Refactor and fixes of integration tests - #909
Merged
mawilk90 merged 41 commits intoSep 18, 2026
Merged
Conversation
mawilk90
marked this pull request as ready for review
September 16, 2026 05:16
mawilk90
requested review from
ezilber-akamai,
psnoch-akamai and
zliang-akamai
and
a lite review from Copilot
and removed request for
a team
September 16, 2026 05:16
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Reserved-IP/VPC cleanup and Linode region and teardown issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Refactors integration tests for the upcoming OpenAPI changes, including updated assertions, IPv6 support, and reserved-IP coverage.
Changes:
- Enables VPC dual-stack testing and updates output checks.
- Refactors shared fixtures and readiness handling.
- Updates object storage, monitoring, firewall, database, and networking tests.
- Adds reserved IPv4 coverage for Linodes and NodeBalancers.
File summaries
| File | Summary |
|---|---|
tests/integration/vpc/test_vpc.py |
Updates VPC assertions and enables IPv6 tests. Moderate finding (2 votes): created VPCs are not cleaned up. |
tests/integration/vpc/conftest.py |
Creates VPC fixtures with IPv6 ranges. |
tests/integration/tags/test_tags.py |
Updates skipped-test metadata. |
tests/integration/support/test_support.py |
Refactors ticket fixtures and headers. |
tests/integration/obj/test_object_storage.py |
Uses the updated transfer command. |
tests/integration/obj/conftest.py |
Improves bucket cleanup logging. |
tests/integration/nodebalancers/test_node_balancers.py |
Adds reserved IPv4 display coverage. |
tests/integration/nodebalancers/fixtures.py |
Adds a reserved-IP NodeBalancer fixture. |
tests/integration/networking/test_networking.py |
Updates IP output checks and adds allocation coverage. Moderate finding (3 votes): allocated reserved IPs are not captured or deleted. |
tests/integration/networking/fixtures.py |
Removes duplicated centralized fixture code. |
tests/integration/monitor/test_metrics.py |
Sends token request bodies as JSON. |
tests/integration/monitor/test_alerts.py |
Updates channel response headers. |
tests/integration/linodes/test_linodes.py |
Adds reserved IPv4 Linode coverage. Moderate findings (3 and 1 votes): the Linode and reserved IP use different regions, and teardown ordering can leave the address attached. |
tests/integration/linodes/test_linode_interfaces.py |
Removes obsolete interface assertions. |
tests/integration/linodes/helpers.py |
Reuses the shared default region. |
tests/integration/linodes/fixtures.py |
Adds reserved-IP Linode setup. |
tests/integration/helpers.py |
Centralizes default-region selection. |
tests/integration/firewalls/test_firewalls.py |
Updates firewall fixture usage and arguments. |
tests/integration/firewalls/test_firewall_settings.py |
Renames firewall fixtures. |
tests/integration/firewalls/conftest.py |
Adds firewall readiness and defaults helpers. |
tests/integration/database/test_database_engine_config.py |
Updates the MySQL engine version. |
tests/integration/database/fixtures.py |
Updates the MySQL fixture version. |
tests/integration/conftest.py |
Enables IPv6 VPC creation and adds reserved-IP fixtures. |
Review details
Suppressed comments (2)
tests/integration/linodes/test_linodes.py:347
- This test attaches the function-scoped
create_reserved_ipresult to the module-scopedtest_linode_instance, but performs no unassignment. Pytest tears down the reserved-IP fixture before the module-scoped Linode, so itsreserved-ip-deletecleanup can run while the address is still attached and fail or leak the resource. Add explicit unassignment/resource cleanup or use a fixture with a safe teardown order.
def test_linode_allocate_res_ipv4(test_linode_instance, create_reserved_ip):
linode_id = test_linode_instance
res_ip = create_reserved_ip["address"]
new_headers = ["reserved", "tags"]
result = exec_test_command(
BASE_CMDS["linodes"]
+ [
"ip-add",
linode_id,
"--address",
res_ip,
tests/integration/vpc/test_vpc.py:264
- This test is also newly enabled but creates a VPC without any teardown. It will leak one VPC per run; please reuse a cleanup fixture or delete the created ID in a
finallyblock before enabling it.
def test_create_vpc_with_custom_ipv6_prefix_length(prefix_len):
- Files reviewed: 23/23 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ezilber-akamai
approved these changes
Sep 16, 2026
ezilber-akamai
left a comment
Contributor
There was a problem hiding this comment.
Everything looks good and the tests passed for me locally! Nice work!
lgarber-akamai
approved these changes
Sep 16, 2026
lgarber-akamai
left a comment
Contributor
There was a problem hiding this comment.
Seems to be passing on my end!
zliang-akamai
approved these changes
Sep 17, 2026
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
Several tests needed to be reviewed, refactored or fixed to get aligned with upcoming openapi spec release
Notes:
✔️ How to Test
make test-intor run full regression in GHA