Skip to content

TPT-4209: Integration tests for NB Front-End IP & 40Gbps #870

Open
mawilk90 wants to merge 16 commits intolinode:devfrom
mawilk90:feature/TPT-4209-linode-cli-add-integration-tests-for-nodebalancer-front-end-ip-in-vpc-mtc
Open

TPT-4209: Integration tests for NB Front-End IP & 40Gbps #870
mawilk90 wants to merge 16 commits intolinode:devfrom
mawilk90:feature/TPT-4209-linode-cli-add-integration-tests-for-nodebalancer-front-end-ip-in-vpc-mtc

Conversation

@mawilk90
Copy link
Copy Markdown
Contributor

@mawilk90 mawilk90 commented Mar 30, 2026

📝 Description

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

NOTES:
1. PR with openapi.json for NBs not merged yet so CLI should be build locally and this PR cannot be merged for now
2. Required tags to avoid fails of NB tests with UDP config: nb-udp-common
3. Preferred env: Prod as there is no valid region on DevCloud to create nodebalancers of type=premium_40gb

✔️ How to Test

CLI build: SPEC=path/to/locally/stored/openapi.json make install

Tests: make test-int TEST_SUITE=nodebalancers TEST_ARGS="-k test_nb_with"

@mawilk90 mawilk90 added testing for updates to the testing suite in the changelog. new-feature for new features in the changelog. labels Mar 30, 2026
@mawilk90 mawilk90 marked this pull request as ready for review March 31, 2026 10:46
@mawilk90 mawilk90 requested review from a team as code owners March 31, 2026 10:46
Copy link
Copy Markdown
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 new integration coverage for NodeBalancer VPC front-end IP behavior and the premium_40gb NodeBalancer type, including supporting test helpers/fixtures to provision a VPC+subnet in an eligible region.

Changes:

  • Added NodeBalancer integration tests for backend VPC attachment, frontend VPC IPv4 assignment, expected failure cases, and premium_40gb creation.
  • Added a NodeBalancer-local fixture to create/cleanup a VPC with a subnet for these tests.
  • Extended region selection helpers to optionally restrict to a known-valid region allowlist (and updated VPC creation helper accordingly).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
tests/integration/nodebalancers/test_node_balancers.py Adds premium region allowlists and new NB/VPC integration tests; adjusts a few UDP node output expectations.
tests/integration/nodebalancers/conftest.py Adds get_vpc_with_subnet fixture for NB tests, using shared VPC creation helper.
tests/integration/helpers.py Extends get_random_region_with_caps with valid_regions filtering.
tests/integration/conftest.py Updates create_vpc_w_subnet to accept valid_regions and selects regions with both VPC and NodeBalancer capabilities.
Comments suppressed due to low confidence (1)

tests/integration/conftest.py:234

  • get_random_region_with_caps(...) can return None (e.g., when valid_regions filters out all matches), but create_vpc_w_subnet passes region straight into the CLI args. Add an explicit check after region selection (e.g., assert/skip with a clear message) to avoid hard-to-debug failures like --region None when no eligible region is available.
    region = get_random_region_with_caps(
        required_capabilities=["VPCs", "NodeBalancers"],
        valid_regions=valid_regions,
    )
    vpc_label = get_random_text(5) + "label"
    subnet_label = get_random_text(5) + "label"

    vpc_json = json.loads(
        exec_test_command(
            [
                "linode-cli",
                "vpcs",
                "create",
                "--label",
                vpc_label,
                "--region",
                region,
                # "--ipv6.range",    TODO: Uncomment after VPC Dual Stack is ready to ship

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

@dawiddzhafarov
Copy link
Copy Markdown
Contributor

Do we want to point this branch to proj branch, to keep it consistent and not merge it accidentally to the dev branch without released openapi.json?

@mawilk90
Copy link
Copy Markdown
Contributor Author

mawilk90 commented Apr 1, 2026

@dawiddzhafarov

Do we want to point this branch to proj branch, to keep it consistent and not merge it accidentally to the dev branch without released openapi.json?

Generally I haven't seen any proj branch here and previously integration tests have been megred directly into dev (example: #801) so I decided to follow the same path

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.

3 participants