Skip to content

Commit

Permalink
bug(tests): Make sure panos_dynamic_updates resource depends on its t…
Browse files Browse the repository at this point in the history
…emplate
  • Loading branch information
kklimonda-cl committed Jan 17, 2025
1 parent 63e8887 commit a598e9a
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions assets/terraform/test/resource_dynamic_updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/hashicorp/terraform-plugin-testing/tfjsonpath"
)

func TestAccDynamicUpdates(t *testing.T) {
func TestAccDynamicUpdates_1(t *testing.T) {
t.Parallel()

nameSuffix := acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
Expand Down Expand Up @@ -303,9 +303,13 @@ func TestAccDynamicUpdates(t *testing.T) {
},
},
})
}

func TestAccDynamicUpdates_2(t *testing.T) {
t.Parallel()

nameSuffix = acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix = fmt.Sprintf("test-acc-%s", nameSuffix)
nameSuffix := acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix := fmt.Sprintf("test-acc-%s", nameSuffix)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProviders,
Expand Down Expand Up @@ -510,8 +514,13 @@ func TestAccDynamicUpdates(t *testing.T) {
},
})

nameSuffix = acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix = fmt.Sprintf("test-acc-%s", nameSuffix)
}

func TestAccDynamicUpdates_3(t *testing.T) {
t.Parallel()

nameSuffix := acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix := fmt.Sprintf("test-acc-%s", nameSuffix)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProviders,
Expand Down Expand Up @@ -637,9 +646,13 @@ func TestAccDynamicUpdates(t *testing.T) {
},
},
})
}

func TestAccDynamicUpdates_4(t *testing.T) {
t.Parallel()

nameSuffix = acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix = fmt.Sprintf("test-acc-%s", nameSuffix)
nameSuffix := acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix := fmt.Sprintf("test-acc-%s", nameSuffix)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProviders,
Expand Down Expand Up @@ -804,9 +817,13 @@ func TestAccDynamicUpdates(t *testing.T) {
},
},
})
}

nameSuffix = acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix = fmt.Sprintf("test-acc-%s", nameSuffix)
func TestAccDynamicUpdates_5(t *testing.T) {
t.Parallel()

nameSuffix := acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix := fmt.Sprintf("test-acc-%s", nameSuffix)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProviders,
Expand Down Expand Up @@ -843,9 +860,13 @@ func TestAccDynamicUpdates(t *testing.T) {
},
},
})
}

func TestAccDynamicUpdates_6(t *testing.T) {
t.Parallel()

nameSuffix = acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix = fmt.Sprintf("test-acc-%s", nameSuffix)
nameSuffix := acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)
prefix := fmt.Sprintf("test-acc-%s", nameSuffix)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProviders,
Expand Down Expand Up @@ -890,7 +911,7 @@ resource "panos_template" "template" {
}
resource "panos_dynamic_updates" "updates" {
location = { template = { name = local.template_name } }
location = { template = { name = panos_template.template.name } }
update_schedule = {
anti_virus = {
Expand Down Expand Up @@ -981,7 +1002,7 @@ resource "panos_template" "template" {
}
resource "panos_dynamic_updates" "updates" {
location = { template = { name = local.template_name } }
location = { template = { name = panos_template.template.name } }
update_schedule = {
anti_virus = {
Expand Down Expand Up @@ -1058,7 +1079,7 @@ resource "panos_template" "template" {
}
resource "panos_dynamic_updates" "updates" {
location = { template = { name = local.template_name } }
location = { template = { name = panos_template.template.name } }
update_schedule = {
anti_virus = {
Expand Down Expand Up @@ -1124,7 +1145,7 @@ resource "panos_template" "template" {
}
resource "panos_dynamic_updates" "updates" {
location = { template = { name = local.template_name } }
location = { template = { name = panos_template.template.name } }
update_schedule = {
anti_virus = {
Expand Down Expand Up @@ -1187,7 +1208,7 @@ resource "panos_template" "template" {
}
resource "panos_dynamic_updates" "updates" {
location = { template = { name = local.template_name } }
location = { template = { name = panos_template.template.name } }
update_schedule = {
wf_private = {
Expand Down Expand Up @@ -1219,7 +1240,7 @@ resource "panos_template" "template" {
}
resource "panos_dynamic_updates" "updates" {
location = { template = { name = local.template_name } }
location = { template = { name = panos_template.template.name } }
update_schedule = {
wildfire = {
Expand Down

0 comments on commit a598e9a

Please sign in to comment.