Skip to content

TPT-4564: Refactor and fixes of integration tests - #909

Merged
mawilk90 merged 41 commits into
linode:devfrom
mawilk90:hotfix/refactor-and-fix-int-tests
Sep 18, 2026
Merged

mawilk90 merged 41 commits into
linode:devfrom
mawilk90:hotfix/refactor-and-fix-int-tests

Conversation

@mawilk90

@mawilk90 mawilk90 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Several tests needed to be reviewed, refactored or fixed to get aligned with upcoming openapi spec release

Notes:

  1. Open api spec used for testing available here

✔️ How to Test

make test-int

or run full regression in GHA

@mawilk90 mawilk90 added testing for updates to the testing suite in the changelog. do-not-merge PRs that should not be merged until the commented issue is resolved hotfix urgent fixes for production issues. labels Jul 27, 2026
@mawilk90 mawilk90 changed the title Refactor and fixes of integration tests TPT-4564: Refactor and fixes of integration tests Jul 27, 2026
@mawilk90
mawilk90 marked this pull request as ready for review September 16, 2026 05:16
@mawilk90
mawilk90 requested review from a team as code owners September 16, 2026 05:16
@mawilk90
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

Copilot AI left a comment

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.

🟡 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_ip result to the module-scoped test_linode_instance, but performs no unassignment. Pytest tears down the reserved-IP fixture before the module-scoped Linode, so its reserved-ip-delete cleanup 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 finally block 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.

Comment thread tests/integration/linodes/test_linodes.py
Comment thread tests/integration/networking/test_networking.py Outdated
Comment thread tests/integration/vpc/test_vpc.py Outdated

@ezilber-akamai ezilber-akamai left a comment

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.

Everything looks good and the tests passed for me locally! Nice work!

@lgarber-akamai lgarber-akamai left a comment

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.

Seems to be passing on my end!

@ezilber-akamai ezilber-akamai removed the do-not-merge PRs that should not be merged until the commented issue is resolved label Sep 17, 2026
Comment thread tests/integration/networking/test_networking.py Outdated
@mawilk90
mawilk90 merged commit 47f15ad into linode:dev Sep 18, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix urgent fixes for production issues. testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants