Skip to content

TPT-4463: Add integration tests for RDMA interfaces#999

Draft
mawilk90 wants to merge 19 commits into
linode:mainfrom
mawilk90:feature/TPT-4463-add-int-tests-for-rdma-interfaces
Draft

TPT-4463: Add integration tests for RDMA interfaces#999
mawilk90 wants to merge 19 commits into
linode:mainfrom
mawilk90:feature/TPT-4463-add-int-tests-for-rdma-interfaces

Conversation

@mawilk90

@mawilk90 mawilk90 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Integration tests for RDMA interfaces

Note:
It is dependent on #988 (when it is merged then a target branch above will be changed)

✔️ How to Test

Some local setup is needed before RDMA tests run.

RDMA integration tests:

  • DevCloud:
    make fixtures TEST_ARGS="-run TestVPC_WithRDMAType"
    make fixtures TEST_ARGS="-run TestVPC_Subnet_WithRDMAType"
    make fixtures TEST_ARGS="-run TestInstance_CreateWithRDMAVPCInterfaces"

Related fixes and refactors:

  • DevCloud:
    make test-int TEST_ARGS="-run TestVPC_CreateGet_smoke"
    make test-int TEST_ARGS="-run TestVPC_Subnet_Create"

  • Prod:
    make test-int TEST_ARGS="-run TestVPC_List"
    make test-int TEST_ARGS="-run TestVPC_Update"
    make test-int TEST_ARGS="-run TestVPC_Create_Invalid_data"
    make test-int TEST_ARGS="-run TestVPC_Update_Invalid"
    make test-int TEST_ARGS="-run TestVPC_Subnet_Create_Invalid_data"
    make test-int TEST_ARGS="-run TestVPC_Subnet_Update_Invalid_data"
    make test-int TEST_ARGS="-run TestLKECluster_Enterprise_BYOVPC_smoke"

@mawilk90 mawilk90 requested review from a team as code owners June 30, 2026 09:27
@mawilk90 mawilk90 requested review from jriddle-linode and removed request for a team June 30, 2026 09:27
@mawilk90 mawilk90 added the new-feature for new features in the changelog. label Jun 30, 2026
@mawilk90 mawilk90 requested a review from a team June 30, 2026 09:27
@mawilk90 mawilk90 added the testing for updates to the testing suite in the changelog. label Jun 30, 2026
@mawilk90 mawilk90 requested review from Copilot and psnoch-akamai and removed request for a team June 30, 2026 09:27

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.

Pull request overview

This PR extends the Linode Go client’s VPC + interface models to represent RDMA-capable VPCs/interfaces and adds unit + integration coverage (plus fixtures) to validate (un)marshalling and key RDMA workflows. It’s intended to pair with the feature work in #988 and adds the test/fixture layer around that functionality.

Changes:

  • Add VPCType (regular/rdma) to VPC and VPC subnet models and wire it into VPC create options.
  • Add RDMA VPC interface models/options plus a new instance-create interface option type that supports RDMA VPC interfaces, with InstanceCreateOptions marshaling support.
  • Add unit tests + integration tests + VCR fixtures for RDMA VPCs and RDMA interfaces.

Reviewed changes

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

Show a summary per file
File Description
vpc.go Introduces VPCType and adds vpc_type support to VPC and create options.
vpc_subnet.go Adds vpc_type to VPC subnet responses.
interfaces.go Adds RDMA VPC interface models/options and instance-create interface option type.
instances.go Adds LinodeInstanceInterfaces and extends InstanceCreateOptions.MarshalJSON conflict + serialization logic.
test/unit/rdma_vpc_test.go Unit coverage for RDMA VPC type, RDMA interface (get/list/update), and marshaling semantics.
test/unit/fixtures/vpc_rdma_get.json Unit fixture for RDMA VPC GET response.
test/unit/fixtures/vpc_rdma_create.json Unit fixture for RDMA VPC create response/validation.
test/unit/fixtures/interface_update_rdma_vpc.json Unit fixture for RDMA interface update response.
test/unit/fixtures/interface_list_with_rdma.json Unit fixture for listing interfaces including RDMA entries.
test/unit/fixtures/interface_get_rdma_vpc.json Unit fixture for RDMA interface GET response.
test/integration/vpc_test.go Integration test refactor + adds RDMA VPC create/get/list filter coverage.
test/integration/vpc_subnet_test.go Integration coverage for subnet vpc_type and RDMA subnet workflows.
test/integration/lke_clusters_test.go Updates helper return signature usage due to createVPC refactor.
test/integration/instance_interfaces_test.go Switches instance-create tests to LinodeInstanceInterfaces and adds RDMA interface integration test.
test/integration/fixtures/TestVPC_CreateGet.yaml Updates recorded interactions to include vpc_type and devcloud URLs.
test/integration/fixtures/TestVPC_Create_Invalid.yaml Updates recorded invalid-label interaction and message.
test/integration/fixtures/TestInstance_CreateWithLinodeInterfaces.yaml Updates recorded instance-create interaction for updated VPC/subnet responses and devcloud URLs.

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

for i := 1; i <= amount; i++ {
interfaces = append(interfaces, linodego.LinodeInstanceInterfaceCreateOptions{
LinodeInterfaceCreateOptions: linodego.LinodeInterfaceCreateOptions{
FirewallID: linodego.Pointer(-1),
Comment on lines +254 to +257
updatedRDMAInterface, err := client.UpdateInterface(context.Background(), instance.ID, basicRDMAInterface.ID, updateOpts)
require.NoErrorf(t, err, "Error updating RDMA interface: %s", err)
assert.Equal(t, basicRDMAInterface.ID, updatedRDMAInterface.ID, "Expected RDMA interface ID to remain the same after update")
assert.Equal(t, basicRDMAInterface.RDMAVPC.SubnetID, vpcSubnetRDMAUpdate.ID, "Expected RDMA interface to be updated")
Comment on lines +263 to +266
e, _ := err.(*linodego.Error)
assert.Equal(t, 400, e.Code, "Expected error code 400, got: %d", e.Code)
expectedErrorMessage := "RDMA VPC Interfaces cannot be deleted"
assert.Contains(t, e.Message, expectedErrorMessage, "Expected error message to contain: %s, got: %s", expectedErrorMessage, e.Message)
Comment on lines +102 to +105
require.NotEmpty(t, vpc.Label, "VPC label should not be empty")
require.Equal(t, opts.Description, vpc.Description, "VPC description mismatch")
require.Equal(t, opts.Region, vpc.Region, "VPC region mismatch")
require.Equal(t, len(opts.Subnets), len(vpc.Subnets), "VPC subnet count mismatch")
@mawilk90 mawilk90 marked this pull request as draft June 30, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog. testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants