Skip to content

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

Merged
psnoch-akamai merged 3 commits into
linode:devfrom
psnoch-akamai:TPT-4651-linode-cli-add-integration-tests-for-premium-nodebalancer
Oct 27, 2026
Merged

psnoch-akamai merged 3 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

Comment thread tests/integration/helpers.py Outdated
Comment thread tests/integration/nodebalancers/fixtures.py Outdated
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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This used is nested inside another function. Without this import there is error:
fixture 'vpc_for_nodebalancer_type_premium_backend_connectivity_vpc' not found

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.

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",

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 ?

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

A nested command list in the VPC fixture causes a TypeError that blocks the Premium NodeBalancer test during setup.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread tests/integration/nodebalancers/fixtures.py Outdated
@psnoch-akamai
psnoch-akamai force-pushed the TPT-4651-linode-cli-add-integration-tests-for-premium-nodebalancer branch from 3e0c3d1 to 7bddca8 Compare October 27, 2026 13:53
@psnoch-akamai
psnoch-akamai requested a balanced review from Copilot October 27, 2026 13:53

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.

🟢 Approval recommended

The previously reported issues are resolved and no blocking issues remain in these test-only changes, though live integration tests were not run.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@psnoch-akamai
psnoch-akamai force-pushed the TPT-4651-linode-cli-add-integration-tests-for-premium-nodebalancer branch from 7bddca8 to 96aed16 Compare October 27, 2026 14:01
@psnoch-akamai
psnoch-akamai merged commit cc40f8d into linode:dev Oct 27, 2026
14 checks passed
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.

4 participants