Skip to content

Commit af2f369

Browse files
committed
Remove bad test in testAccContainerCluster_withIPAllocationPolicy
One step was expecting the test to fail if the subnetwork defines secondary ip ranges that the cluster doesn't use. However, it is perfectly fine to do so and we don't expect an error.
1 parent 5e907c7 commit af2f369

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Diff for: google/resource_container_cluster_test.go

-12
Original file line numberDiff line numberDiff line change
@@ -681,17 +681,6 @@ func TestAccContainerCluster_withIPAllocationPolicy(t *testing.T) {
681681
"ip_allocation_policy.0.services_secondary_range_name", "services"),
682682
),
683683
},
684-
{
685-
Config: testAccContainerCluster_withIPAllocationPolicy(
686-
cluster,
687-
map[string]string{
688-
"pods": "10.1.0.0/16",
689-
"services": "10.2.0.0/20",
690-
},
691-
map[string]string{},
692-
),
693-
ExpectError: regexp.MustCompile("clusters using IP aliases must specify secondary ranges"),
694-
},
695684
{
696685
Config: testAccContainerCluster_withIPAllocationPolicy(
697686
cluster,
@@ -1586,7 +1575,6 @@ resource "google_container_cluster" "with_maintenance_window" {
15861575
}
15871576

15881577
func testAccContainerCluster_withIPAllocationPolicy(cluster string, ranges, policy map[string]string) string {
1589-
15901578
var secondaryRanges bytes.Buffer
15911579
for rangeName, cidr := range ranges {
15921580
secondaryRanges.WriteString(fmt.Sprintf(`

0 commit comments

Comments
 (0)