Skip to content

Commit

Permalink
Merge pull request #5143 from modular-magician/codegen-pr-2820
Browse files Browse the repository at this point in the history
Rename resources in container_node_pool_test to use sweeper prefix
  • Loading branch information
c2thorn authored Dec 16, 2019
2 parents 9afcffe + 40b2029 commit 37a4514
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions google/resource_container_node_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
func TestAccContainerNodePool_basic(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -35,8 +35,8 @@ func TestAccContainerNodePool_basic(t *testing.T) {
func TestAccContainerNodePool_maxPodsPerNode(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -58,7 +58,7 @@ func TestAccContainerNodePool_maxPodsPerNode(t *testing.T) {
func TestAccContainerNodePool_namePrefix(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -81,7 +81,7 @@ func TestAccContainerNodePool_namePrefix(t *testing.T) {
func TestAccContainerNodePool_noName(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -103,8 +103,8 @@ func TestAccContainerNodePool_noName(t *testing.T) {
func TestAccContainerNodePool_withNodeConfig(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
nodePool := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
nodePool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -160,8 +160,8 @@ func TestAccContainerNodePool_withGPU(t *testing.T) {
func TestAccContainerNodePool_withManagement(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
nodePool := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
nodePool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))
management := `
management {
auto_repair = "true"
Expand Down Expand Up @@ -233,8 +233,8 @@ func TestAccContainerNodePool_withNodeConfigScopeAlias(t *testing.T) {
func TestAccContainerNodePool_regionalAutoscaling(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -287,8 +287,8 @@ func TestAccContainerNodePool_regionalAutoscaling(t *testing.T) {
func TestAccContainerNodePool_autoscaling(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -341,8 +341,8 @@ func TestAccContainerNodePool_autoscaling(t *testing.T) {
func TestAccContainerNodePool_resize(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -378,8 +378,8 @@ func TestAccContainerNodePool_resize(t *testing.T) {
func TestAccContainerNodePool_version(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -417,8 +417,8 @@ func TestAccContainerNodePool_version(t *testing.T) {
func TestAccContainerNodePool_regionalClusters(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -440,8 +440,8 @@ func TestAccContainerNodePool_regionalClusters(t *testing.T) {
func TestAccContainerNodePool_012_ConfigModeAttr(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -471,8 +471,8 @@ func TestAccContainerNodePool_012_ConfigModeAttr(t *testing.T) {
func TestAccContainerNodePool_EmptyGuestAccelerator(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -516,8 +516,8 @@ func TestAccContainerNodePool_EmptyGuestAccelerator(t *testing.T) {
func TestAccContainerNodePool_shieldedInstanceConfig(t *testing.T) {
t.Parallel()

cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -591,7 +591,7 @@ resource "google_container_node_pool" "np" {
func testAccContainerNodePool_maxPodsPerNode(cluster, np string) string {
return fmt.Sprintf(`
resource "google_compute_network" "container_network" {
name = "container-net-%s"
name = "tf-test-container-net-%s"
auto_create_subnetworks = false
}
Expand Down Expand Up @@ -922,15 +922,15 @@ data "google_container_engine_versions" "central1c" {
}
resource "google_container_cluster" "cluster" {
name = "tf-cluster-nodepool-test-%s"
name = "tf-test-cluster-%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
}
resource "google_container_node_pool" "np_with_gpu" {
name = "tf-nodepool-test-%s"
name = "tf-test-nodepool-%s"
location = "us-central1-c"
cluster = google_container_cluster.cluster.name
Expand Down Expand Up @@ -965,13 +965,13 @@ resource "google_container_node_pool" "np_with_gpu" {
func testAccContainerNodePool_withNodeConfigScopeAlias() string {
return fmt.Sprintf(`
resource "google_container_cluster" "cluster" {
name = "tf-cluster-nodepool-test-%s"
name = "tf-test-cluster-%s"
location = "us-central1-a"
initial_node_count = 1
}
resource "google_container_node_pool" "np_with_node_config_scope_alias" {
name = "tf-nodepool-test-%s"
name = "tf-test-nodepool-%s"
location = "us-central1-a"
cluster = google_container_cluster.cluster.name
initial_node_count = 1
Expand Down

0 comments on commit 37a4514

Please sign in to comment.