TPT-4456: Enable integration test for RDMA Linode interface - #1032
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enables the previously skipped RDMA VPC Linode interface integration test by updating the test setup (firewall handling, fixed region/plan selection) and refreshing the go-vcr cassette to match the new recorded interactions.
Changes:
- Stop skipping
TestInstance_CreateWithRDMAVPCInterfacesand update the instance creation options used by the test (region/plan, firewall opt-out behavior). - Ensure
FirewallIDis explicitly set to-1on interfaces when Cloud Firewall is disabled (to avoid implicit/default firewall behavior). - Update the recorded integration fixture
TestInstance_CreateWithRDMAVPCInterfaces.yamlto align with the new request/response sequence and IDs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/integration/instance_interfaces_test.go | Enables the RDMA interface integration test and adjusts instance/interface creation defaults (firewall opt-out, region/plan selection). |
| test/integration/fixtures/TestInstance_CreateWithRDMAVPCInterfaces.yaml | Updates the VCR fixture to reflect the new recorded API interactions for the RDMA interface test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // GPUDirect RDMA capability not available in all regions, so we hardcode a region that supports it for this test. | ||
| // testRegion := getRegionsWithCaps(t, client, []linodego.RegionCapability{linodego.CapabilityVPCs, linodego.CapabilityGPUDirectRDMA})[0] | ||
| testRegion := getRegionsWithCaps(t, client, []linodego.RegionCapability{linodego.CapabilityVPCs})[0] | ||
| testRegion := "us-rno-1" |
There was a problem hiding this comment.
Does it make sense to store RDMA region in env vars as you did in Terraform tests?
There was a problem hiding this comment.
I think it's not much benefit here in linodego, because we eventually recorded the fixtures and it includes both region and the plan. The major point I use the env vars in terraform is to avoid the test breaks the workflow in the future, when the region is no longer available for us to create rdma.
| opts.Region = testRegion | ||
| // opts.Type = linodego.InstanceRDMAType | ||
| // opts.HostID = linodego.InstanceRDMAHostID | ||
| opts.Type = "g3-gpu-rtxpro6000-blackwell-rdma-8" |
ezilber-akamai
left a comment
There was a problem hiding this comment.
Tests pass locally!
* TPT-4463: Support RDMA VPC interfaces (#988) * init * lint * address comments for omitzero * lint * update comment * fix interfaces list * fix lint * Fix RDMA project branch merge from v2 (#1003) * fix v2 * udpate * TPT-4463: Add integration tests for RDMA interfaces (#999) * init # Conflicts: # interfaces.go # regions.go # test/unit/fixtures/interface_list_with_rdma.json # test/unit/rdma_vpc_test.go # vpc.go * address comments for omitzero * Refactor vpcCreateOptionsCheck to use createOpts 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. * Update fixtures * Create int tests for VPC and VPC Subnet with RDMA type * Add assertion for regular VPC type * Update vpcCreateOptionsCheck to use require * Update error msg in TestVPC_Update_Invalid * Update fixtures for TestVPC_List tests * Update err msg for invalid label in VPC and Subnet tests * Add negative TCs for RDMA VPC with IPv6 * Create int test for Linode instance with RDMA interfaces * Refactor createInstanceWithLinodeInterfaces to use LinodeInstanceInterfaceCreateOptions * Refactor TestInstance_CreateWithRDMAVPCInterfaces to use createInstanceWithLinodeInterfaces * Small refactor & fixture update * Linter * Comment out TestInstance_CreateWithRDMAVPCInterfaces due to infra changes needed * Update comment for TestVPC_WithRDMATypeIPv6_Fail * Update fixtures for TestVPC_CreateGet_smoke and TestVPC_Subnet_Create * Update fixtures and TestVPC_IPv4Ranges to return 4 vals in createVPC * Update TestInstance_CreateWithRDMAVPCInterfaces * Address Copilot remarks * Uncomment TestVPC_WithRDMATypeAndIPv6_Fail as IPv6 is blocked already --------- Co-authored-by: Ye Chen <yechen@akamai.com> * fix conflict * Add booted=false for RDMA Linode instance creation * TPT-4456: Enable integration test for RDMA Linode interface (#1032) * add for passing tests * update test * disable cfw * add pointers to omitzero fields * fmt --------- Co-authored-by: Maciej Wilk <mawilk@akamai.com>
📝 Description
Remove skipping the test and allow to run the case.
✔️ How to Test