Skip to content

Commit

Permalink
update dc to region
Browse files Browse the repository at this point in the history
  • Loading branch information
yec-akamai committed Dec 5, 2023
1 parent f855a0e commit ed8118a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion account_availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// AccountAvailability returns the resources information in a region which are NOT available to an account.
type AccountAvailability struct {
// region id
DC string `json:"dc"`
Region string `json:"region"`

// the unavailable resources in a region to the customer
Unavailable []string `json:"unavailable"`
Expand Down
4 changes: 2 additions & 2 deletions test/integration/account_availability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestAccountAvailability_Get(t *testing.T) {
t.Errorf("Error getting Account Availability, expected struct, got error %v", err)
}

if availability.DC != regionID {
t.Errorf("expected region ID to be %s; got %s", regionID, availability.DC)
if availability.Region != regionID {
t.Errorf("expected region ID to be %s; got %s", regionID, availability.Region)
}
}
4 changes: 2 additions & 2 deletions test/integration/fixtures/TestAccountAvailability_Get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interactions:
url: https://api.linode.com/v4beta/account/availability/us-east
method: GET
response:
body: '{"dc": "us-east", "unavailable": []}'
body: '{"region": "us-east", "unavailable": []}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -30,7 +30,7 @@ interactions:
- private, max-age=0, s-maxage=0, no-cache, no-store
- private, max-age=60, s-maxage=60
Content-Length:
- "36"
- "40"
Content-Security-Policy:
- default-src 'none'
Content-Type:
Expand Down
14 changes: 7 additions & 7 deletions test/integration/fixtures/TestAccountAvailability_List.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ interactions:
url: https://api.linode.com/v4beta/account/availability
method: GET
response:
body: '{"data": [{"dc": "ap-west", "unavailable": []}, {"dc": "ca-central", "unavailable":
[]}, {"dc": "ap-southeast", "unavailable": []}, {"dc": "us-central", "unavailable":
[]}, {"dc": "us-west", "unavailable": []}, {"dc": "us-southeast", "unavailable":
[]}, {"dc": "us-east", "unavailable": []}, {"dc": "eu-west", "unavailable":
[]}, {"dc": "ap-south", "unavailable": []}, {"dc": "eu-central", "unavailable":
[]}, {"dc": "ap-northeast", "unavailable": []}], "page": 1, "pages": 1, "results":
11}'
body: '{"data": [{"region": "ap-west", "unavailable": []}, {"region": "ca-central",
"unavailable": []}, {"region": "ap-southeast", "unavailable": []}, {"region":
"us-central", "unavailable": []}, {"region": "us-west", "unavailable": []},
{"region": "us-southeast", "unavailable": []}, {"region": "us-east", "unavailable":
[]}, {"region": "eu-west", "unavailable": []}, {"region": "ap-south", "unavailable":
[]}, {"region": "eu-central", "unavailable": []}, {"region": "ap-northeast",
"unavailable": []}], "page": 1, "pages": 1, "results": 11}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand Down

0 comments on commit ed8118a

Please sign in to comment.