Skip to content

Commit ede641e

Browse files
committed
Add version guard for GKE Accelerator Network Profile Tests
1 parent 529638e commit ede641e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16659,6 +16659,7 @@ resource "google_container_cluster" "with_kubelet_config" {
1665916659
`, clusterName, networkName, subnetworkName, npName, npName)
1666016660
}
1666116661

16662+
{{ if ne $.TargetVersionName `ga` -}}
1666216663
func testAccContainerCluster_nodePool_acceleratorNetworkProfile(clusterName string) string {
1666316664
return fmt.Sprintf(`
1666416665
resource "google_container_cluster" "primary" {
@@ -16741,7 +16742,9 @@ func TestAccContainerCluster_nodePool_acceleratorNetworkProfile(t *testing.T) {
1674116742
},
1674216743
})
1674316744
}
16745+
{{- end }}
1674416746

16747+
{{ if ne $.TargetVersionName `ga` -}}
1674516748
func testAccContainerCluster_nodePool_additionalNodeNetworkConfigs_manual(clusterName string) string {
1674616749
return fmt.Sprintf(`
1674716750
resource "google_compute_network" "main_net" {
@@ -17035,4 +17038,5 @@ func TestAccContainerCluster_nodePool_acceleratorNetworkProfile_Lifecycle(t *tes
1703517038
},
1703617039
},
1703717040
})
17038-
}
17041+
}
17042+
{{- end }}

mmv1/third_party/terraform/services/container/resource_container_node_pool_test.go.tmpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6501,6 +6501,7 @@ resource "google_container_node_pool" "np" {
65016501
`, cluster, np, networkName, subnetworkName, storagePoolResourceName, location)
65026502
}
65036503

6504+
{{ if ne $.TargetVersionName `ga` -}}
65046505
func testAccContainerNodePool_acceleratorNetworkProfile(clusterName, npName string) string {
65056506
return fmt.Sprintf(`
65066507
resource "google_container_cluster" "primary" {
@@ -6594,7 +6595,9 @@ func TestAccContainerNodePool_acceleratorNetworkProfile(t *testing.T) {
65946595
},
65956596
})
65966597
}
6598+
{{- end }}
65976599

6600+
{{ if ne $.TargetVersionName `ga` -}}
65986601
func testAccContainerNodePool_acceleratorNetworkProfile_manual(clusterName, npName string) string {
65996602
return fmt.Sprintf(`
66006603
resource "google_compute_network" "main_net" {
@@ -6899,5 +6902,5 @@ func TestAccContainerNodePool_acceleratorNetworkProfile_Lifecycle(t *testing.T)
68996902
},
69006903
})
69016904
}
6902-
6905+
{{- end }}
69036906

0 commit comments

Comments
 (0)