Repository navigation
TPT-4651: Add integration tests for Premium NodeBalancer changes - #933
psnoch-akamai wants to merge 2 commits into
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.
|
|
||
| def assert_help_parameters_list_for_command(expected_parameters, help_output): | ||
| for expected_parameter in expected_parameters: | ||
| re.search( |
There was a problem hiding this comment.
Agree, it will never fail without assert
| test_region = get_random_region_with_caps( | ||
| ["NodeBalancers", "Premium NodeBalancers"] | ||
| ) |
There was a problem hiding this comment.
Agree, it will probably fail on Prod
| 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
| 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 ?

✔️ 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.