Skip to content

TPT-4206: Integration tests for NB Front-End IP & 40Gbps#915

Merged
mawilk90 merged 22 commits intolinode:proj/nb-front-end-ip-in-vpcfrom
mawilk90:feature/TPT-4206-sdks-add-int-tests-for-nb-front-end-ip-in-vpc
Mar 23, 2026
Merged

TPT-4206: Integration tests for NB Front-End IP & 40Gbps#915
mawilk90 merged 22 commits intolinode:proj/nb-front-end-ip-in-vpcfrom
mawilk90:feature/TPT-4206-sdks-add-int-tests-for-nb-front-end-ip-in-vpc

Conversation

@mawilk90
Copy link
Contributor

@mawilk90 mawilk90 commented Mar 16, 2026

📝 Description

Integration tests for NodeBalancer Front-End IP in VPC and 40Gbps NodeBalancer-MTC

NOTE:
There is no valid region on DevCloud to create nodebalancers of type=premium_40gb so one test will fail. I decided to do not add 'skipif' dependent on the env, because we usually do not execute tests on DevCloud

✔️ How to Test

make test-int TEST_ARGS="-run TestNodeBalancer_Create_With"

@mawilk90
Copy link
Contributor Author

There are two tests that check API error message in case of invalid nodebalancer's request body (similarly as it was in python SDK). I'm not sure what is the correct approach here so decided to leave them but comment them out (since they are expected to fail there is no fixtures for them at all)

@mawilk90 mawilk90 marked this pull request as ready for review March 18, 2026 09:33
@mawilk90 mawilk90 requested a review from a team as a code owner March 18, 2026 09:33
@mawilk90 mawilk90 requested review from Copilot, mgwoj and vshanthe and removed request for a team March 18, 2026 09:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds/updates integration tests to validate NodeBalancer behavior when using VPC front-end IPs (premium) and the premium_40gb NodeBalancer type, along with supporting test utilities and recorded fixtures.

Changes:

  • Extend NodeBalancer integration tests to cover: backend-VPC-only, frontend-VPC-only (premium), frontend+backend in different VPCs, and premium_40gb.
  • Update VPC creation helpers to select regions using linodego.Capability* constants (and include NodeBalancer capability).
  • Add a generic getIntersection helper and new VCR fixtures for the added test cases.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/integration/vpc_subnet_test.go Adjusts region capability filtering for VPC creation helpers used by integration tests.
test/integration/util_test.go Adds a generic slice intersection helper used for region selection.
test/integration/nodebalancers_test.go Adds new NodeBalancer/VPC integration tests and setup helpers, plus region selection logic.
test/integration/fixtures/TestNodeBalancer_Create_WithBackendVPCOnly.yaml New recorded fixture for backend-VPC-only NodeBalancer creation.
test/integration/fixtures/TestNodeBalancer_Create_WithFrontendVPCOnly.yaml New recorded fixture for frontend-VPC-only (premium) NodeBalancer creation.
test/integration/fixtures/TestNodeBalancer_Create_WithFrontendAndBackendInDifferentVPCs.yaml New recorded fixture for frontend+backend in different VPCs.
test/integration/fixtures/TestNodeBalancer_Create_WithPremium40gbType.yaml New recorded fixture for premium_40gb NodeBalancer creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mawilk90 mawilk90 removed the request for review from vshanthe March 18, 2026 12:28
@mawilk90 mawilk90 added new-feature for new features in the changelog. testing for updates to the testing suite in the changelog. labels Mar 19, 2026
@mawilk90 mawilk90 merged commit b352f40 into linode:proj/nb-front-end-ip-in-vpc Mar 23, 2026
10 checks passed
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.

5 participants