From 9961ae161450ec696cf53f9ee52607b18c9ae028 Mon Sep 17 00:00:00 2001 From: Nathan Mckinley Date: Tue, 5 May 2020 15:59:25 -0700 Subject: [PATCH 1/3] Fix node pool tests. --- .../terraform/tests/resource_container_node_pool_test.go.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/terraform/tests/resource_container_node_pool_test.go.erb b/third_party/terraform/tests/resource_container_node_pool_test.go.erb index 1d04a048c4dc..d6b725baee9b 100644 --- a/third_party/terraform/tests/resource_container_node_pool_test.go.erb +++ b/third_party/terraform/tests/resource_container_node_pool_test.go.erb @@ -568,6 +568,9 @@ func TestAccContainerNodePool_resize(t *testing.T) { }) } +<%# Re-enable this test when there is more than one acceptable node pool version + for the current master version. + func TestAccContainerNodePool_version(t *testing.T) { t.Parallel() @@ -606,6 +609,7 @@ func TestAccContainerNodePool_version(t *testing.T) { }, }) } +%> func TestAccContainerNodePool_regionalClusters(t *testing.T) { t.Parallel() @@ -1363,7 +1367,6 @@ resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-c" initial_node_count = 1 - node_version = data.google_container_engine_versions.central1c.latest_node_version min_master_version = data.google_container_engine_versions.central1c.latest_master_version } From 79d1ce485574b3ca3e2fa86f6343ed39f2c2492b Mon Sep 17 00:00:00 2001 From: Nathan Mckinley Date: Tue, 5 May 2020 16:25:38 -0700 Subject: [PATCH 2/3] also remove dead code. --- .../terraform/tests/resource_container_node_pool_test.go.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/terraform/tests/resource_container_node_pool_test.go.erb b/third_party/terraform/tests/resource_container_node_pool_test.go.erb index d6b725baee9b..06988a34c93a 100644 --- a/third_party/terraform/tests/resource_container_node_pool_test.go.erb +++ b/third_party/terraform/tests/resource_container_node_pool_test.go.erb @@ -1425,6 +1425,9 @@ resource "google_container_node_pool" "np_with_node_config_scope_alias" { `, cluster, np) } +<%# Re-enable this test when there is more than one acceptable node pool version + for the current master version. + func testAccContainerNodePool_version(cluster, np string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { @@ -1472,6 +1475,7 @@ resource "google_container_node_pool" "np" { } `, cluster, np) } +%> func testAccContainerNodePool_012_ConfigModeAttr1(cluster, np string) string { return fmt.Sprintf(` From 07d9536deb64564ca6d48680a7cb23fc29a7c13e Mon Sep 17 00:00:00 2001 From: Nathan Mckinley Date: Mon, 11 May 2020 15:20:37 -0700 Subject: [PATCH 3/3] swap to t.Skip instead. --- .../tests/resource_container_node_pool_test.go.erb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/third_party/terraform/tests/resource_container_node_pool_test.go.erb b/third_party/terraform/tests/resource_container_node_pool_test.go.erb index 06988a34c93a..5372f4bc515c 100644 --- a/third_party/terraform/tests/resource_container_node_pool_test.go.erb +++ b/third_party/terraform/tests/resource_container_node_pool_test.go.erb @@ -568,12 +568,14 @@ func TestAccContainerNodePool_resize(t *testing.T) { }) } -<%# Re-enable this test when there is more than one acceptable node pool version - for the current master version. func TestAccContainerNodePool_version(t *testing.T) { t.Parallel() + // Re-enable this test when there is more than one acceptable node pool version + // for the current master version + t.Skip() + cluster := fmt.Sprintf("tf-test-cluster-%s", randString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", randString(t, 10)) @@ -609,7 +611,6 @@ func TestAccContainerNodePool_version(t *testing.T) { }, }) } -%> func TestAccContainerNodePool_regionalClusters(t *testing.T) { t.Parallel() @@ -1425,9 +1426,6 @@ resource "google_container_node_pool" "np_with_node_config_scope_alias" { `, cluster, np) } -<%# Re-enable this test when there is more than one acceptable node pool version - for the current master version. - func testAccContainerNodePool_version(cluster, np string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { @@ -1475,7 +1473,6 @@ resource "google_container_node_pool" "np" { } `, cluster, np) } -%> func testAccContainerNodePool_012_ConfigModeAttr1(cluster, np string) string { return fmt.Sprintf(`