Skip to content
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

testing: Find previous K8s release dynamically. #916

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

andrewsomething
Copy link
Member

The DOKS acceptance tests are currently failing due to changes in the available Kubernetes versions. 1.21.x and 1.22.x are no longer available:

$ doctl kubernetes options versions 
Slug            Kubernetes Version    Supported Features
1.25.4-do.0     1.25.4                cluster-autoscaler, docr-integration, ha-control-plane, token-authentication
1.24.8-do.0     1.24.8                cluster-autoscaler, docr-integration, ha-control-plane, token-authentication
1.23.14-do.0    1.23.14               cluster-autoscaler, docr-integration, ha-control-plane, token-authentication

The only reason why we have specific versions referenced is to test the upgrade path, and generally upgrades are only supported from the previous major version. This change calculates the previous version from the latest version. This should allow us to no longer need to update the versions in the test config.

$ make testacc TESTARGS='-run TestAccDigitalOceanKubernetesCluster_UpgradeVersion'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccDigitalOceanKubernetesCluster_UpgradeVersion -timeout 120m
?       github.com/digitalocean/terraform-provider-digitalocean [no test files]
=== RUN   TestAccDigitalOceanKubernetesCluster_UpgradeVersion
=== PAUSE TestAccDigitalOceanKubernetesCluster_UpgradeVersion
=== CONT  TestAccDigitalOceanKubernetesCluster_UpgradeVersion
--- PASS: TestAccDigitalOceanKubernetesCluster_UpgradeVersion (381.71s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean    381.722s
testing: warning: no tests to run
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/internal/datalist       (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/internal/mutexkv        (cached) [no tests to run]

@andrewsomething andrewsomething temporarily deployed to Acceptance Tests January 13, 2023 19:24 — with GitHub Actions Inactive
@andrewsomething andrewsomething merged commit fc3827f into main Jan 17, 2023
@andrewsomething andrewsomething deleted the asb/k8s-version-hardcoded branch January 17, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants