Skip to content

Commit

Permalink
Rename compute_(region)_per_instance_config test files to .erb files … (
Browse files Browse the repository at this point in the history
GoogleCloudPlatform#7409)

* Rename compute_(region)_per_instance_config test files to .erb files since the resources have fields in beta.

* Omit stateful_ip tests for GA
  • Loading branch information
hao-nan-li authored and ericayyliu committed Jul 26, 2023
1 parent 07d4b50 commit 502b9c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<% autogen_exception -%>
package google

import (
Expand Down Expand Up @@ -125,6 +126,7 @@ func TestAccComputePerInstanceConfig_update(t *testing.T) {
})
}

<% unless version == 'ga' -%>
func TestAccComputePerInstanceConfig_statefulIps(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -165,6 +167,7 @@ func TestAccComputePerInstanceConfig_statefulIps(t *testing.T) {
},
})
}
<% end -%>

func testAccComputePerInstanceConfig_statefulBasic(context map[string]interface{}) string {
return Nprintf(`
Expand Down Expand Up @@ -336,6 +339,7 @@ resource "google_compute_instance_group_manager" "igm" {
`, context)
}

<% unless version == 'ga' -%>
func testAccComputePerInstanceConfig_statefulIpsBasic(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_network" "default" {
Expand Down Expand Up @@ -485,6 +489,7 @@ resource "google_compute_disk" "disk1" {
}
`, context) + testAccComputePerInstanceConfig_igm(context)
}
<% end -%>

// Checks that the per instance config with the given name was destroyed
func testAccCheckComputePerInstanceConfigDestroyed(t *testing.T, igmId, configName string) resource.TestCheckFunc {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<% autogen_exception -%>
package google

import (
Expand Down Expand Up @@ -124,7 +125,7 @@ func TestAccComputeRegionPerInstanceConfig_update(t *testing.T) {
},
})
}

<% unless version == 'ga' -%>
func TestAccComputeRegionPerInstanceConfig_statefulIps(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -165,6 +166,7 @@ func TestAccComputeRegionPerInstanceConfig_statefulIps(t *testing.T) {
},
})
}
<% end -%>

func testAccComputeRegionPerInstanceConfig_statefulBasic(context map[string]interface{}) string {
return Nprintf(`
Expand Down Expand Up @@ -343,7 +345,7 @@ resource "google_compute_region_instance_group_manager" "rigm" {
}
`, context)
}

<% unless version == 'ga' -%>
func testAccComputeRegionPerInstanceConfig_statefulIpsBasic(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_network" "default" {
Expand Down Expand Up @@ -495,6 +497,7 @@ resource "google_compute_disk" "disk1" {
}
`, context) + testAccComputeRegionPerInstanceConfig_rigm(context)
}
<% end -%>

// Checks that the per instance config with the given name was destroyed
func testAccCheckComputeRegionPerInstanceConfigDestroyed(t *testing.T, rigmId, configName string) resource.TestCheckFunc {
Expand Down

0 comments on commit 502b9c7

Please sign in to comment.