From f03df34206f0b9e3f372eab77017b8e524d664fa Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Tue, 4 Mar 2025 10:12:18 -0500 Subject: [PATCH] fix --- lke_clusters.go | 4 ++-- .../fixtures/TestLKETierVersion_ListAndGet.yaml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lke_clusters.go b/lke_clusters.go index a1e4f3a3c..18f19dfc6 100644 --- a/lke_clusters.go +++ b/lke_clusters.go @@ -204,13 +204,13 @@ func (c *Client) GetLKEVersion(ctx context.Context, version string) (*LKEVersion // ListLKETierVersions lists all Kubernetes versions available given tier through LKE. // NOTE: This endpoint may not currently be available to all users and can only be used with v4beta. func (c *Client) ListLKETierVersions(ctx context.Context, tier string, opts *ListOptions) ([]LKETierVersion, error) { - return getPaginatedResults[LKETierVersion](ctx, c, formatAPIPath("lke/versions/%s", tier), opts) + return getPaginatedResults[LKETierVersion](ctx, c, formatAPIPath("lke/tiers/%s/versions", tier), opts) } // GetLKETierVersion gets the details of a specific LKE tier version. // NOTE: This endpoint may not currently be available to all users and can only be used with v4beta. func (c *Client) GetLKETierVersion(ctx context.Context, tier string, versionID string) (*LKETierVersion, error) { - return doGETRequest[LKETierVersion](ctx, c, formatAPIPath("lke/versions/%s/%s", tier, versionID)) + return doGETRequest[LKETierVersion](ctx, c, formatAPIPath("lke/tiers/%s/versions/%s", tier, versionID)) } // ListLKEClusterAPIEndpoints gets the API Endpoint for the LKE Cluster specified diff --git a/test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml b/test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml index 5bd436b3f..66ecab636 100644 --- a/test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml +++ b/test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml @@ -11,11 +11,11 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/lke/versions/standard?page=1 + url: https://api.linode.com/v4beta/lke/tiers/standard/versions?page=1 method: GET response: - body: '{"data": [{"id": "1.31", "tier": "standard"}, {"id": "1.30", "tier": "standard"}], - "page": 1, "pages": 1, "results": 2}' + body: '{"data": [{"id": "1.32", "tier": "standard"}, {"id": "1.31", "tier": "standard"}, + {"id": "1.30", "tier": "standard"}], "page": 1, "pages": 1, "results": 3}' headers: Access-Control-Allow-Credentials: - "true" @@ -34,13 +34,13 @@ interactions: Connection: - keep-alive Content-Length: - - "119" + - "155" Content-Security-Policy: - default-src 'none' Content-Type: - application/json Expires: - - Mon, 10 Feb 2025 17:36:11 GMT + - Tue, 04 Mar 2025 15:10:20 GMT Pragma: - no-cache Strict-Transport-Security: @@ -75,10 +75,10 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/lke/versions/standard/1.31 + url: https://api.linode.com/v4beta/lke/tiers/standard/versions/1.32 method: GET response: - body: '{"id": "1.31", "tier": "standard"}' + body: '{"id": "1.32", "tier": "standard"}' headers: Access-Control-Allow-Credentials: - "true" @@ -103,7 +103,7 @@ interactions: Content-Type: - application/json Expires: - - Mon, 10 Feb 2025 17:36:12 GMT + - Tue, 04 Mar 2025 15:10:20 GMT Pragma: - no-cache Strict-Transport-Security: