Repository navigation
TPT-4651: Add integration tests for Premium NodeBalancer changes - #933
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Fixture setup failures can leak VPC resources, and help assertions can pass despite missing options.
2 open findings
What changed in this PR
Adds integration coverage for Premium NodeBalancers with VPC backends.
Changes:
- Tests list columns, create/view/update output, and create-command help.
- Adds a Premium NodeBalancer fixture with VPC resources.
- Introduces a shared help-parameter assertion helper.
| File | Description |
|---|---|
| tests/integration/nodebalancers/test_node_balancers.py | Adds Premium NodeBalancer and CLI output tests. |
| tests/integration/nodebalancers/fixtures.py | Provisions a VPC-backed Premium NodeBalancer. |
| tests/integration/helpers.py | Adds help-parameter assertions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| nodebalancer_with_reserved_ipv4, | ||
| nodebalancer_with_udp_config_and_node, | ||
| simple_nodebalancer_with_config, | ||
| vpc_for_nodebalancer_type_premium_backend_connectivity_vpc, |
There was a problem hiding this comment.
It seems to be never used in this file
There was a problem hiding this comment.
This used is nested inside another function. Without this import there is error:
fixture 'vpc_for_nodebalancer_type_premium_backend_connectivity_vpc' not found
There was a problem hiding this comment.
Yes, you're right, I didn't notice that those fixtures are stored in nodebalancers/fixtures.py and need to be imported explicitly
| test_vpc_id = exec_test_command( | ||
| [ | ||
| "linode-cli", | ||
| "vpcs", |
|
|
||
|
|
||
| @pytest.fixture | ||
| def nodebalancer_type_premium_backend_connectivity_vpc( |
There was a problem hiding this comment.
IMO, this name is a bit redundant. What do you think to make it simpler, e.g. nodebalancer_premium_with_backend_vpc ?
|
|
||
|
|
||
| @pytest.fixture | ||
| def vpc_for_nodebalancer_type_premium_backend_connectivity_vpc(): |
There was a problem hiding this comment.
+1. What do you think about: vpc_for_nb_premium_backend_connectivity ?
3e0c3d1 to
7bddca8
Compare
7bddca8 to
96aed16
Compare

✔️ How to Test
make test-int TEST_CASE=test_verify_columns_for_list_nodebalancersmake test-int TEST_CASE=test_premium_nodebalancer_with_vpc_backend_connectivitymake test-int TEST_CASE=test_create_nodebalancer_help_commandTo run tests verify required configuration described at JIRA epic ticket.