Skip to content

Commit

Permalink
Fix tests and re-run relevant fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Jul 3, 2024
1 parent 3a6208e commit 8d41d43
Show file tree
Hide file tree
Showing 20 changed files with 418 additions and 717 deletions.
3 changes: 3 additions & 0 deletions instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ type Instance struct {

// NOTE: Placement Groups may not currently be available to all users.
PlacementGroup *InstancePlacementGroup `json:"placement_group"`

DiskEncryption InstanceDiskEncryption `json:"disk_encryption"`
LKEClusterID int `json:"lke_cluster_id"`
}

// InstanceSpec represents a linode spec
Expand Down
54 changes: 25 additions & 29 deletions test/integration/fixtures/TestLKECluster_APIEndpoints_List.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/regions
url: https://api.linode.com/v4beta/regions
method: GET
response:
body: '{"data": [{"id": "ap-west", "label": "Mumbai, India", "country": "in",
Expand All @@ -29,6 +29,14 @@ interactions:
"VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "fake-cph-4", "label": "Fake CPH 4, DK", "country":
"dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers":
{"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "fake-cph-5", "label": "Fake CPH 5, DK", "country":
"dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers":
{"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country":
"us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Kubernetes",
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5",
Expand Down Expand Up @@ -58,21 +66,21 @@ interactions:
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country":
"sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Object Storage",
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20",
"sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"],
"status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country":
"de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Object Storage",
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5",
"de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"],
"status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country":
"jp", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"],
"status": "ok", "resolvers": {"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 11}'
5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 13}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -87,10 +95,6 @@ interactions:
Cache-Control:
- private, max-age=900
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "7192"
Content-Security-Policy:
- default-src 'none'
Content-Type:
Expand All @@ -100,6 +104,7 @@ interactions:
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
Expand Down Expand Up @@ -128,10 +133,10 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters
url: https://api.linode.com/v4beta/lke/clusters
method: POST
response:
body: '{"id": 7456, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
body: '{"id": 7873, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
"2018-01-02T03:04:05", "label": "go-lke-test-apiend", "region": "us-east", "k8s_version":
"1.29", "control_plane": {"high_availability": false}, "tags": ["testing"]}'
headers:
Expand All @@ -147,8 +152,6 @@ interactions:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Cache-Control:
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "242"
Content-Security-Policy:
Expand Down Expand Up @@ -187,7 +190,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters/7456/api-endpoints
url: https://api.linode.com/v4beta/lke/clusters/7873/api-endpoints
method: GET
response:
body: '{"errors": [{"reason": "Cluster API Endpoints are not yet available. Please
Expand All @@ -199,8 +202,6 @@ interactions:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Connection:
- keep-alive
Content-Length:
- "96"
Content-Type:
Expand All @@ -217,7 +218,7 @@ interactions:
- '*'
X-Ratelimit-Limit:
- "400"
status: 503 SERVICE UNAVAILABLE
status: 503 Service Unavailable
code: 503
duration: ""
- request:
Expand All @@ -230,12 +231,12 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters/7456/api-endpoints
url: https://api.linode.com/v4beta/lke/clusters/7873/api-endpoints
method: GET
response:
body: '{"page": 1, "pages": 1, "results": 4, "data": [{"endpoint": "https://fbb841d7-aa0a-4afd-89c7-0cf907d5fea1.cpc1-cjj1-testing.linodelke.net:443"},
{"endpoint": "https://fbb841d7-aa0a-4afd-89c7-0cf907d5fea1.cpc1-cjj1-testing.linodelke.net:6443"},
{"endpoint": "https://172.234.1.81:443"}, {"endpoint": "https://172.234.1.81:6443"}]}'
body: '{"page": 1, "pages": 1, "results": 4, "data": [{"endpoint": "https://2b31f7ad-4814-454b-9f5f-38f8c7bb4a50.cpc1-cjj1-testing.linodelke.net:443"},
{"endpoint": "https://2b31f7ad-4814-454b-9f5f-38f8c7bb4a50.cpc1-cjj1-testing.linodelke.net:6443"},
{"endpoint": "https://207.192.68.214:443"}, {"endpoint": "https://207.192.68.214:6443"}]}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -250,10 +251,6 @@ interactions:
Cache-Control:
- private, max-age=0, s-maxage=0, no-cache, no-store
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "329"
Content-Security-Policy:
- default-src 'none'
Content-Type:
Expand All @@ -263,6 +260,7 @@ interactions:
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
Expand Down Expand Up @@ -291,7 +289,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters/7456
url: https://api.linode.com/v4beta/lke/clusters/7873
method: DELETE
response:
body: '{}'
Expand All @@ -308,8 +306,6 @@ interactions:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Cache-Control:
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "2"
Content-Security-Policy:
Expand Down
47 changes: 22 additions & 25 deletions test/integration/fixtures/TestLKECluster_Dashboard_Get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/regions
url: https://api.linode.com/v4beta/regions
method: GET
response:
body: '{"data": [{"id": "ap-west", "label": "Mumbai, India", "country": "in",
Expand All @@ -29,6 +29,14 @@ interactions:
"VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "fake-cph-4", "label": "Fake CPH 4, DK", "country":
"dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers":
{"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "fake-cph-5", "label": "Fake CPH 5, DK", "country":
"dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers":
{"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country":
"us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Kubernetes",
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5",
Expand Down Expand Up @@ -58,21 +66,21 @@ interactions:
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country":
"sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Object Storage",
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20",
"sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"],
"status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country":
"de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Object Storage",
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5",
"de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"],
"status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country":
"jp", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"],
"status": "ok", "resolvers": {"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5",
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"},
"placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg":
5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 11}'
5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 13}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -87,10 +95,6 @@ interactions:
Cache-Control:
- private, max-age=900
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "7192"
Content-Security-Policy:
- default-src 'none'
Content-Type:
Expand All @@ -100,6 +104,7 @@ interactions:
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
Expand Down Expand Up @@ -128,10 +133,10 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters
url: https://api.linode.com/v4beta/lke/clusters
method: POST
response:
body: '{"id": 7458, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
body: '{"id": 7875, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
"2018-01-02T03:04:05", "label": "go-lke-test-dash", "region": "us-east", "k8s_version":
"1.29", "control_plane": {"high_availability": false}, "tags": ["testing"]}'
headers:
Expand All @@ -147,8 +152,6 @@ interactions:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Cache-Control:
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "240"
Content-Security-Policy:
Expand Down Expand Up @@ -187,10 +190,10 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters/7458
url: https://api.linode.com/v4beta/lke/clusters/7875
method: GET
response:
body: '{"id": 7458, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
body: '{"id": 7875, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
"2018-01-02T03:04:05", "label": "go-lke-test-dash", "region": "us-east", "k8s_version":
"1.29", "control_plane": {"high_availability": false}, "tags": ["testing"]}'
headers:
Expand All @@ -207,8 +210,6 @@ interactions:
Cache-Control:
- private, max-age=0, s-maxage=0, no-cache, no-store
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "240"
Content-Security-Policy:
Expand Down Expand Up @@ -248,10 +249,10 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters/7458/dashboard
url: https://api.linode.com/v4beta/lke/clusters/7875/dashboard
method: GET
response:
body: '{"url": "https://5d026680-6439-49a1-9ca9-0408aba5f076.dashboard.cpc1-cjj1-testing.linodelke.net"}'
body: '{"url": "https://60677a04-30ea-4106-854a-5b7d3db482ae.dashboard.cpc1-cjj1-testing.linodelke.net"}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -266,8 +267,6 @@ interactions:
Cache-Control:
- private, max-age=0, s-maxage=0, no-cache, no-store
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "97"
Content-Security-Policy:
Expand Down Expand Up @@ -307,7 +306,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4/lke/clusters/7458
url: https://api.linode.com/v4beta/lke/clusters/7875
method: DELETE
response:
body: '{}'
Expand All @@ -324,8 +323,6 @@ interactions:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Cache-Control:
- private, max-age=60, s-maxage=60
Connection:
- keep-alive
Content-Length:
- "2"
Content-Security-Policy:
Expand Down
Loading

0 comments on commit 8d41d43

Please sign in to comment.