TPT-4209: Integration tests for NB Front-End IP & 40Gbps #870
Conversation
Some of the regions (e.g. es-mad) cannot be used for nodebalancers and test fails
There was a problem hiding this comment.
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_40gbcreation. - 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 returnNone(e.g., whenvalid_regionsfilters out all matches), butcreate_vpc_w_subnetpassesregionstraight 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 Nonewhen 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.
|
Do we want to point this branch to |
Generally I haven't seen any |
…ests-for-nodebalancer-front-end-ip-in-vpc-mtc
…ests-for-nodebalancer-front-end-ip-in-vpc-mtc
📝 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. Preferred env:
Prodas 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 installTests:
make test-int TEST_SUITE=nodebalancers TEST_ARGS="-k test_nb_with"