kubernetes: Fail faster on cluster create error (fixes: #434). (#435)

* kubernetes: Fail faster on cluster create error (fixes: #434).

* Bump k8s test version slugs.
This commit is contained in:
Andrew Starr-Bochicchio 2020-05-13 17:08:17 -04:00 committed by GitHub
parent f4ae42123d
commit ae4578c0e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -485,6 +485,11 @@ func waitForKubernetesClusterCreate(client *godo.Client, id string) (*godo.Kuber
return cluster, nil
}
if cluster.Status.State == "error" {
ticker.Stop()
return nil, fmt.Errorf(cluster.Status.Message)
}
if n > timeout {
ticker.Stop()
break

View File

@ -13,8 +13,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)
const testClusterVersion15 = "1.15.9-do.2"
const testClusterVersion16 = "1.16.6-do.2"
const testClusterVersion15 = "1.15.11-do.0"
const testClusterVersion16 = "1.16.8-do.0"
func TestAccDigitalOceanKubernetesCluster_Basic(t *testing.T) {
t.Parallel()