Support regions/vpc-availability endpoints#880
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for VPC availability endpoints in regions, enabling clients to query which regions support VPCs and their available IPv6 prefix lengths.
Changes:
- Added
RegionVPCAvailabilitystruct and two new API methods:ListRegionsVPCAvailabilityandGetRegionVPCAvailability - Implemented comprehensive unit tests with fixture data for both list and get operations
- Added integration tests with recorded API responses
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| regions_availability.go | Implements new RegionVPCAvailability struct and API methods with caching support |
| test/unit/region_test.go | Adds unit tests for listing and retrieving VPC availability data |
| test/unit/fixtures/regions_vpc_availability_list.json | Fixture data for list VPC availability endpoint |
| test/unit/fixtures/region_vpc_availability_get.json | Fixture data for get VPC availability endpoint |
| test/integration/regionsavailability_test.go | Integration tests for VPC availability endpoints |
| test/integration/fixtures/TestRegionsVPCAvailability_List.yaml | Recorded API response for list operation |
| test/integration/fixtures/TestRegionVPCAvailability_Get.yaml | Recorded API response for get operation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b2109d6 to
80e4f55
Compare
There was a problem hiding this comment.
The output of those fixtures were recorded in the devcloud env rather than prod. This is because I don't have the token yet. But if I understand correctly, if someone run make fixtures for those tests, the output would differ greatly. That's why @mgwoj generated those output fixtures for production (as he has access) so I could use them here already, and future make fixtures would not generate such big diffs.
Should I use the fixtures obtained from prod env by Michał already?
There was a problem hiding this comment.
I have gained the access to the prod env and regenerated test data based on that env.
80e4f55 to
2aa4f20
Compare
466841d to
c0448b4
Compare
…c-availability-endpoints
📝 Description
Add support for region vpc availability endpoints
✔️ How to Test
To run all unit and integration tests:
make test-unitmake test-intTo run only newly added unit and integration tests:
make TEST_ARGS="-run TestListRegionsVPCAvailability" test-unitmake TEST_ARGS="-run TestGetRegionVPCAvailability" test-unitmake TEST_ARGS="-run TestRegionsVPCAvailability_List" test-intmake TEST_ARGS="-run TestRegionVPCAvailability_Get" test-int