Skip to content

TPT-4651: Add integration tests for Premium NodeBalancer changes - #933

Open
psnoch-akamai wants to merge 2 commits into
linode:devfrom
psnoch-akamai:TPT-4651-linode-cli-add-integration-tests-for-premium-nodebalancer
Open

psnoch-akamai wants to merge 2 commits into
linode:devfrom
psnoch-akamai:TPT-4651-linode-cli-add-integration-tests-for-premium-nodebalancer

Conversation

@psnoch-akamai

Copy link
Copy Markdown
Contributor

✔️ How to Test

make test-int TEST_CASE=test_verify_columns_for_list_nodebalancers
make test-int TEST_CASE=test_premium_nodebalancer_with_vpc_backend_connectivity
make test-int TEST_CASE=test_create_nodebalancer_help_command

To run tests verify required configuration described at JIRA epic ticket.

@psnoch-akamai
psnoch-akamai requested review from a team as code owners October 15, 2026 15:40
@psnoch-akamai
psnoch-akamai requested review from jcamelon and mawilk90 and a balanced review from Copilot and removed request for a team October 15, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Comment thread tests/integration/helpers.py Outdated
Comment thread tests/integration/nodebalancers/fixtures.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Missing assertions undermine help validation, and independent region selection can cause fixture setup failures.

2 open issues
2 resolved since last review

Review effort: Balanced


def assert_help_parameters_list_for_command(expected_parameters, help_output):
for expected_parameter in expected_parameters:
re.search(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree, it will never fail without assert

Comment on lines +374 to +376
test_region = get_random_region_with_caps(
["NodeBalancers", "Premium NodeBalancers"]
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems to be never used in this file

test_vpc_id = exec_test_command(
[
"linode-cli",
"vpcs",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BASE_CMDS["vpcs"]



@pytest.fixture
def nodebalancer_type_premium_backend_connectivity_vpc(

@mawilk90 mawilk90 Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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():

@mawilk90 mawilk90 Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1. What do you think about: vpc_for_nb_premium_backend_connectivity ?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants