TPT-4463: Add integration tests for RDMA interfaces#999
Conversation
There was a problem hiding this comment.
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
InstanceCreateOptionsmarshaling 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.
|
Let me update the base branch and see if it fixes the workflow issues and clean up the git history |
|
There are a few things not compatible from merging v2. I've put up a PR to address them: #1003 After it merged you should be good to rebase from the proj branch into your branch to clean up the commit history. Although it's probably some conflicts to fix. I wonder if it's easier to check out a brand new branch though. |
|
@mawilk90 and @yec-akamai, how about rebase of |
Current implementation of vpcCreateOptionsCheck verifies fields copied from VPC so comparing opts.Label == vpc.Label etc. is just comparing a value to itself —> good is always true.
…rfaceCreateOptions
…ceWithLinodeInterfaces
6bb9e2b to
763321a
Compare
@psnoch-akamai @yec-akamai I rebased the code so it should be fine now |
📝 Description
Integration tests for RDMA interfaces
Notes:
✔️ How to Test
Some local setup is needed before RDMA tests run.
RDMA integration tests:
make fixtures TEST_ARGS="-run TestVPC_WithRDMAType"make fixtures TEST_ARGS="-run TestVPC_Subnet_WithRDMAType"make fixtures TEST_ARGS="-run TestInstance_CreateWithRDMAVPCInterfaces"<- commented out as it requires manual infra setup at the momentRelated 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"