Skip to content

TPT-4602: Support NAT service int tests - #743

Open
mawilk90 wants to merge 7 commits into
linode:proj/nat-service-for-vpcfrom
mawilk90:TPT-4602-support-nat-service-int-tests
Open

mawilk90 wants to merge 7 commits into
linode:proj/nat-service-for-vpcfrom
mawilk90:TPT-4602-support-nat-service-int-tests

Conversation

@mawilk90

@mawilk90 mawilk90 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

📝 Description

Created integration tests for VPC NAT Gateway service.

Notes:

  1. Please check the API spec for the required Linode account configuration.
  2. Reported issue VPC-6253 - unskip dedicated test when resolved

✔️ How to Test

make test-int TEST_ARGS="-k nat_gateway"

@mawilk90 mawilk90 added new-feature for new features in the changelog. testing for updates to the testing suite in the changelog. labels Sep 22, 2026
@mawilk90
mawilk90 requested a lite review from Copilot September 22, 2026 14:05

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.

Copilot review overview

🟡 Changes recommended

Unresolved moderate findings affect resource cleanup, regional placement, interface selection, and settings assertions.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity

Open (3)
What changed in this PR

Adds integration coverage for VPC NAT Gateway functionality.

Changes:

  • Adds NAT Gateway and VPC subnet integration tests.
  • Adds NAT Gateway, VPC, subnet, and Linode fixtures.
  • Covers lifecycle, address assignment, interfaces, types, and settings.
File Description
test/​integration/​models/​vpc/​test_vpc.py Tests NAT Gateway attachment to VPC subnets.
test/​integration/​models/​networking/​test_networking.py Adds NAT Gateway operation and settings tests.
test/​integration/​conftest.py Adds NAT-related integration fixtures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/integration/conftest.py Outdated
Comment thread test/integration/models/networking/test_networking.py Outdated
Comment thread test/integration/models/networking/test_networking.py Outdated
@mawilk90
mawilk90 marked this pull request as ready for review September 23, 2026 09:19
@mawilk90
mawilk90 requested review from a team as code owners September 23, 2026 09:19
@mawilk90
mawilk90 requested review from lgarber-akamai and psnoch-akamai and removed request for a team September 23, 2026 09:19
@mawilk90
mawilk90 force-pushed the TPT-4602-support-nat-service-int-tests branch from 330bb12 to f1074b5 Compare September 23, 2026 09:49

@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.

Tests are passing locally and look good. Nice work!

@zliang-akamai
zliang-akamai requested a lite review from Copilot September 24, 2026 21:26

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.

Copilot review overview

🟡 Changes recommended

Several integration tests contain incorrect interface, region, error-message, and teardown handling.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
Resolved since last review (3)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Compares against the wrong Linode interface

test/​integration/​models/​networking/​test_networking.py:227

The Linode is created before the new VPC interface, so its existing public interface remains at index 0; the NAT gateway interface is not linode.linode_interfaces[0] (the repository's interface tests establish public first and VPC second). This compares against the wrong interface and will fail; compare with the newly created interface or verify membership instead.

Comment on lines +695 to +710
def test_get_nat_gateway_linode_ifaces(
test_linode_client,
e2e_test_firewall,
create_nat_gateway,
create_nat_vpc_with_subnet_and_linode,
create_nat_reserved_ip,
):
client = test_linode_client
gateway = create_nat_gateway
vpc, subnet, linode = create_nat_vpc_with_subnet_and_linode
reserved_ip = create_nat_reserved_ip

gateway.address_assignment_create(reserved_ip.address)
# Link the NAT Gateway to the VPC Subnet
subnet.natgateway = VPCSubnetNATGatewayOptions(id=gateway.id)
subnet.save()
client, {Capability.linodes, Capability.firewall}, site_type="core"
)

while region == gateway.region:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog. testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants