linode / linodego

Go client for Linode REST v4 API
MIT License
138 stars 81 forks source link

fix: Separate plan availability logic from getRegionsWithCaps(...) #558

Closed lgarber-akamai closed 1 month ago

lgarber-akamai commented 1 month ago

📝 Description

This pull request separates the plan availability logic from getRegionWithCaps(...) into a separate getRegionsWithCapsAndPlans(...) function.

This prevents us from needing to specify desired plans for tests that don't need them, and lets us avoid re-running all test fixtures as a bonus.

This should resolve the following errors in CI:

2024/07/23 14:45:02.320444 WARN RESTY Get "https://api.linode.com/v4beta/regions/availability?page=1": Requested interaction not found, Attempt 1
2024/07/23 14:45:02.320460 ERROR RESTY Get "https://api.linode.com/v4beta/regions/availability?page=1": Requested interaction not found

✔️ How to Test

  1. Pull down this PR locally.
  2. Run make SKIP_LINT=1 test
  3. Ensure the above errors are not raised.