Skip to content

Commit cfa2c60

Browse files
Remove TestAccContainerCluster_failedCreation (#9310) (#16314)
[upstream:10e6993df58d414b6c03b3f414bae5798fa8df07] Signed-off-by: Modular Magician <[email protected]>
1 parent 9095cd2 commit cfa2c60

File tree

2 files changed

+2
-62
lines changed

2 files changed

+2
-62
lines changed

.changelog/9310.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```release-note:none
2+
```

google/services/container/resource_container_cluster_test.go

-62
Original file line numberDiff line numberDiff line change
@@ -4487,34 +4487,6 @@ func TestAccContainerCluster_withEnablePrivateEndpointToggle(t *testing.T) {
44874487
})
44884488
}
44894489

4490-
func TestAccContainerCluster_failedCreation(t *testing.T) {
4491-
// Test that in a scenario where the cluster fails to create, a subsequent apply will delete the resource.
4492-
// Skip this test for now as we don't have a good way to force cluster creation to fail. https://github.com/hashicorp/terraform-provider-google/issues/13711
4493-
t.Skip()
4494-
t.Parallel()
4495-
4496-
clusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10))
4497-
4498-
project := acctest.BootstrapProject(t, "tf-fail-cluster-", envvar.GetTestBillingAccountFromEnv(t), []string{"container.googleapis.com"})
4499-
acctest.RemoveContainerServiceAgentRoleFromContainerEngineRobot(t, project)
4500-
4501-
acctest.VcrTest(t, resource.TestCase{
4502-
PreCheck: func() { acctest.AccTestPreCheck(t) },
4503-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
4504-
Steps: []resource.TestStep{
4505-
{
4506-
Config: testAccContainerCluster_failedCreation(clusterName, project.ProjectId),
4507-
ExpectError: regexp.MustCompile("timeout while waiting for state to become 'DONE'"),
4508-
},
4509-
{
4510-
Config: testAccContainerCluster_failedCreation_update(clusterName, project.ProjectId),
4511-
ExpectError: regexp.MustCompile("Failed to create cluster"),
4512-
Check: testAccCheckContainerClusterDestroyProducer(t),
4513-
},
4514-
},
4515-
})
4516-
}
4517-
45184490
func testAccContainerCluster_withEnablePrivateEndpoint(clusterName string, flag string) string {
45194491

45204492
return fmt.Sprintf(`
@@ -7263,40 +7235,6 @@ resource "google_container_cluster" "primary" {
72637235
`, name, name, name)
72647236
}
72657237

7266-
func testAccContainerCluster_failedCreation(cluster, project string) string {
7267-
return fmt.Sprintf(`
7268-
resource "google_container_cluster" "primary" {
7269-
name = "%s"
7270-
project = "%s"
7271-
location = "us-central1-a"
7272-
initial_node_count = 1
7273-
7274-
workload_identity_config {
7275-
workload_pool = "%s.svc.id.goog"
7276-
}
7277-
7278-
timeouts {
7279-
create = "40s"
7280-
}
7281-
deletion_protection = false
7282-
}`, cluster, project, project)
7283-
}
7284-
7285-
func testAccContainerCluster_failedCreation_update(cluster, project string) string {
7286-
return fmt.Sprintf(`
7287-
resource "google_container_cluster" "primary" {
7288-
name = "%s"
7289-
project = "%s"
7290-
location = "us-central1-a"
7291-
initial_node_count = 1
7292-
7293-
workload_identity_config {
7294-
workload_pool = "%s.svc.id.goog"
7295-
}
7296-
deletion_protection = false
7297-
}`, cluster, project, project)
7298-
}
7299-
73007238
func testAccContainerCluster_autopilot_minimal(name string) string {
73017239
return fmt.Sprintf(`
73027240
resource "google_container_cluster" "primary" {

0 commit comments

Comments
 (0)