Skip to content

TPT-4368: Update integration tests due to deprecated "vpcs" for NB create#926

Merged
mawilk90 merged 6 commits intolinode:proj/nb-front-end-ip-in-vpcfrom
mawilk90:feature/TPT-4368-sdks-update-integration-tests-due-to-deprecated-vpcs-for-nb-create
Apr 17, 2026
Merged

TPT-4368: Update integration tests due to deprecated "vpcs" for NB create#926
mawilk90 merged 6 commits intolinode:proj/nb-front-end-ip-in-vpcfrom
mawilk90:feature/TPT-4368-sdks-update-integration-tests-due-to-deprecated-vpcs-for-nb-create

Conversation

@mawilk90
Copy link
Copy Markdown
Contributor

@mawilk90 mawilk90 commented Mar 31, 2026

📝 Description

Changes related to the fact that "vpcs" attribute is deprecated (but still valid) in favor of "backend_vpcs" in POST /nodebalancers

✔️ How to Test

Without fixtures:
go test -count=1 ./test/integration/ -v -run TestNodeBalancer_Create_With

With fixtures:
make test-int TEST_ARGS="-run TestNodeBalancer_Create_With"

@mawilk90 mawilk90 force-pushed the feature/TPT-4368-sdks-update-integration-tests-due-to-deprecated-vpcs-for-nb-create branch from 7c8d1ed to 33f7afa Compare April 2, 2026 08:07
…-update-integration-tests-due-to-deprecated-vpcs-for-nb-create
@mawilk90 mawilk90 marked this pull request as ready for review April 3, 2026 12:29
@mawilk90 mawilk90 requested a review from a team as a code owner April 3, 2026 12:29
@mawilk90 mawilk90 requested review from Copilot and ezilber-akamai and removed request for a team April 3, 2026 12:29
Copy link
Copy Markdown
Contributor

@dawiddzhafarov dawiddzhafarov left a comment

Choose a reason for hiding this comment

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

LGTM and tests pass!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Linodego integration tests/fixtures to account for the deprecation of the vpcs field on NodeBalancer create requests in favor of backend_vpcs, while also adding coverage to ensure the deprecated field remains accepted for now.

Changes:

  • Updated NodeBalancer integration test setup helpers to send backend_vpcs instead of vpcs.
  • Refreshed integration fixtures to match the new request payloads (backend_vpcs) and updated recorded responses.
  • Added a new integration test + fixture to validate the deprecated vpcs create attribute is still accepted.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/integration/nodebalancers_test.go Switches create options to BackendVPCs in helpers; adds a new test for deprecated VPCs usage.
test/integration/fixtures/TestNodeBalancer_Create_WithFrontendAndBackendInDifferentVPCs.yaml Updates recorded POST body from vpcs to backend_vpcs (plus re-recorded fixture deltas).
test/integration/fixtures/TestNodeBalancer_Create_WithDeprecatedVPCsAttribute.yaml New fixture for the deprecated vpcs attribute create path.
test/integration/fixtures/TestNodeBalancer_Create_WithBackendVPCOnly.yaml Updates recorded POST body from vpcs to backend_vpcs (plus re-recorded fixture deltas).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/integration/nodebalancers_test.go Outdated
Comment thread test/integration/nodebalancers_test.go
Comment thread test/integration/nodebalancers_test.go Outdated
Copy link
Copy Markdown
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

I get this error:

    nodebalancers_test.go:143: 
                Error Trace:    /Users/ezilber/Projects/dx-devenv/repos/linodego/test/integration/nodebalancers_test.go:566
                                                        /Users/ezilber/Projects/dx-devenv/repos/linodego/test/integration/nodebalancers_test.go:143
                Error:          Received unexpected error:
                                [400] [type] User doesn't have permissions to add the requested type of NodeBalancer
                Test:           TestNodeBalancer_Create_WithFrontendVPCOnly
                Messages:       Error listing nodebalancers, expected struct, got error [400] [type] User doesn't have permissions to add the requested type of NodeBalancer

despite having (I think) all required customer tags on my account.

@mawilk90
Copy link
Copy Markdown
Contributor Author

mawilk90 commented Apr 7, 2026

I get this error:

    nodebalancers_test.go:143: 
                Error Trace:    /Users/ezilber/Projects/dx-devenv/repos/linodego/test/integration/nodebalancers_test.go:566
                                                        /Users/ezilber/Projects/dx-devenv/repos/linodego/test/integration/nodebalancers_test.go:143
                Error:          Received unexpected error:
                                [400] [type] User doesn't have permissions to add the requested type of NodeBalancer
                Test:           TestNodeBalancer_Create_WithFrontendVPCOnly
                Messages:       Error listing nodebalancers, expected struct, got error [400] [type] User doesn't have permissions to add the requested type of NodeBalancer

despite having (I think) all required customer tags on my account.

Hi @ezilber-akamai , I have added you nb-frontend-vpc-ip-support tag so please try again and let me know if it works

EDIT:
Please check also if you have LINODE_API_VERSION variable set in your local env - it will fail with this error if the env doesn't have it

@mawilk90 mawilk90 added testing for updates to the testing suite in the changelog. enhancement issues that request a enhancement labels Apr 15, 2026
Copy link
Copy Markdown

@ckulinsk ckulinsk left a comment

Choose a reason for hiding this comment

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

LGTM, tests passed locally

@mawilk90 mawilk90 merged commit 79888a1 into linode:proj/nb-front-end-ip-in-vpc Apr 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement issues that request a enhancement testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants