Skip to content

Add lke versions helper and update tests #748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test-unit:
cd test && make test-unit

test-int:
cd test && make test-int
cd test && make test-int TEST_TIMEOUT=$(TEST_TIMEOUT)

testcov-func:
@go test -v -coverprofile="coverage.txt" . > /dev/null 2>&1
Expand All @@ -40,7 +40,7 @@ testcov-html:
@go tool cover -html coverage.txt

test-smoke:
cd test && make test-smoke
cd test && make test-smoke TEST_TIMEOUT=$(TEST_TIMEOUT)

build: vet lint
go build ./...
Expand Down Expand Up @@ -77,7 +77,7 @@ run_fixtures:
LINODE_API_VERSION="v4beta" \
LINODE_URL="$(LINODE_URL)" \
GO111MODULE="on" \
go test --tags $(TEST_TAGS) -timeout=$(TEST_TIMEOUT) -v $(TEST_ARGS)
go test -timeout=$(TEST_TIMEOUT) -v $(TEST_ARGS)

sanitize:
@echo "* Sanitizing fixtures"
Expand Down
4 changes: 2 additions & 2 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test-int:
LINODE_TOKEN="awesometokenawesometokenawesometoken" \
LINODE_API_VERSION="v4beta" \
GO111MODULE="on" \
go test -v ./integration $(TEST_ARGS)
go test -v ./integration $(TEST_ARGS) -timeout=$(TEST_TIMEOUT)

.PHONY: test-unit

Expand All @@ -20,4 +20,4 @@ test-smoke:
LINODE_API_VERSION="v4beta" \
LINODE_URL="$(LINODE_URL)" \
GO111MODULE="on" \
go test -v -run smoke ./integration/...
go test -v -run smoke ./integration/... -timeout=$(TEST_TIMEOUT)
381 changes: 206 additions & 175 deletions test/integration/fixtures/TestLKECluster_APIEndpoints_List.yaml

Large diffs are not rendered by default.

394 changes: 237 additions & 157 deletions test/integration/fixtures/TestLKECluster_APLEnabled.yaml

Large diffs are not rendered by default.

394 changes: 237 additions & 157 deletions test/integration/fixtures/TestLKECluster_Dashboard_Get.yaml

Large diffs are not rendered by default.

328 changes: 18 additions & 310 deletions test/integration/fixtures/TestLKECluster_Enterprise_smoke.yaml

Large diffs are not rendered by default.

386 changes: 233 additions & 153 deletions test/integration/fixtures/TestLKECluster_GetFound.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/integration/fixtures/TestLKECluster_GetMissing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Fri, 11 Apr 2025 16:52:16 GMT
- Mon, 12 May 2025 18:58:30 GMT
Pragma:
- no-cache
Vary:
Expand Down
419 changes: 225 additions & 194 deletions test/integration/fixtures/TestLKECluster_Kubeconfig_Delete.yaml

Large diffs are not rendered by default.

473 changes: 301 additions & 172 deletions test/integration/fixtures/TestLKECluster_Kubeconfig_Get.yaml

Large diffs are not rendered by default.

384 changes: 232 additions & 152 deletions test/integration/fixtures/TestLKECluster_Nodes_Recycle.yaml

Large diffs are not rendered by default.

335 changes: 177 additions & 158 deletions test/integration/fixtures/TestLKECluster_Update.yaml

Large diffs are not rendered by default.

665 changes: 495 additions & 170 deletions test/integration/fixtures/TestLKECluster_WaitForReady.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

398 changes: 239 additions & 159 deletions test/integration/fixtures/TestLKECluster_withACL.yaml

Large diffs are not rendered by default.

405 changes: 241 additions & 164 deletions test/integration/fixtures/TestLKEClusters_List.yaml

Large diffs are not rendered by default.

406 changes: 243 additions & 163 deletions test/integration/fixtures/TestLKENodePoolNode_Delete.yaml

Large diffs are not rendered by default.

406 changes: 243 additions & 163 deletions test/integration/fixtures/TestLKENodePoolNode_Get.yaml

Large diffs are not rendered by default.

396 changes: 238 additions & 158 deletions test/integration/fixtures/TestLKENodePoolNode_Recycle.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

591 changes: 262 additions & 329 deletions test/integration/fixtures/TestLKENodePool_GetFound.yaml

Large diffs are not rendered by default.

37 changes: 5 additions & 32 deletions test/integration/fixtures/TestLKENodePool_GetFound_k8s.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Fri, 11 Apr 2025 17:41:38 GMT
- Mon, 12 May 2025 20:28:32 GMT
Pragma:
- no-cache
Vary:
Expand Down
404 changes: 242 additions & 162 deletions test/integration/fixtures/TestLKENodePool_Recycle.yaml

Large diffs are not rendered by default.

420 changes: 250 additions & 170 deletions test/integration/fixtures/TestLKENodePool_Update.yaml

Large diffs are not rendered by default.

406 changes: 243 additions & 163 deletions test/integration/fixtures/TestLKENodePools_List.yaml

Large diffs are not rendered by default.

143 changes: 130 additions & 13 deletions test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ interactions:
url: https://api.linode.com/v4beta/lke/tiers/standard/versions?page=1
method: GET
response:
body: '{"data": [{"id": "1.32", "tier": "standard"}, {"id": "1.31", "tier": "standard"},
{"id": "1.30", "tier": "standard"}], "page": 1, "pages": 1, "results": 3}'
body: '{"data": [{"id": "1.32", "tier": "standard"}, {"id": "1.31", "tier": "standard"}],
"page": 1, "pages": 1, "results": 2}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -34,13 +34,13 @@ interactions:
Connection:
- keep-alive
Content-Length:
- "155"
- "119"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Tue, 04 Mar 2025 15:10:20 GMT
- Mon, 12 May 2025 20:27:43 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand All @@ -56,10 +56,7 @@ interactions:
- DENY
- DENY
X-Oauth-Scopes:
- account:read_write databases:read_write domains:read_write events:read_write
firewall:read_write images:read_write ips:read_write linodes:read_write lke:read_write
longview:read_write nodebalancers:read_write object_storage:read_write stackscripts:read_write
volumes:read_write vpc:read_write
- '*'
X-Xss-Protection:
- 1; mode=block
status: 200 OK
Expand Down Expand Up @@ -103,7 +100,130 @@ interactions:
Content-Type:
- application/json
Expires:
- Tue, 04 Mar 2025 15:10:20 GMT
- Mon, 12 May 2025 20:27:43 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- lke:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "1600"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/tiers/enterprise/versions?page=1
method: GET
response:
body: '{"data": [{"id": "v1.31.8+lke1", "tier": "enterprise"}], "page": 1, "pages":
1, "results": 1}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "93"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 12 May 2025 20:27:43 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- lke:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/tiers/enterprise/versions/v1.31.8+lke1
method: GET
response:
body: '{"id": "v1.31.8+lke1", "tier": "enterprise"}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "44"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 12 May 2025 20:27:44 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand All @@ -119,10 +239,7 @@ interactions:
- DENY
- DENY
X-Oauth-Scopes:
- account:read_write databases:read_write domains:read_write events:read_write
firewall:read_write images:read_write ips:read_write linodes:read_write lke:read_write
longview:read_write nodebalancers:read_write object_storage:read_write stackscripts:read_write
volumes:read_write vpc:read_write
- '*'
X-Ratelimit-Limit:
- "1600"
X-Xss-Protection:
Expand Down
Loading