Skip to content

Commit

Permalink
Fix acceptance tests that no longer compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
kklimonda-cl committed Oct 17, 2024
1 parent ee709c0 commit 3cfa125
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions assets/terraform/test/resource_address_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func makeAddressGroupConfig(label string) string {
default = false
}
resource "panos_address_objects" "google_dns_servers" {
resource "panos_addresses" "google_dns_servers" {
location = {
shared = true
}
Expand All @@ -120,7 +120,7 @@ func makeAddressGroupConfig(label string) string {
}
name = "${var.address_group_name}-base-${var.name_suffix}"
static = [for name, data in resource.panos_address_objects.google_dns_servers.addresses : name]
static = [for name, data in resource.panos_addresses.google_dns_servers.addresses : name]
}
resource "panos_address_group" "%s" {
Expand All @@ -133,7 +133,7 @@ func makeAddressGroupConfig(label string) string {
static = var.from_address_group ? (
[panos_address_group.%s_base[0].name]
) : (
[for name, data in resource.panos_address_objects.google_dns_servers.addresses : name]
[for name, data in resource.panos_addresses.google_dns_servers.addresses : name]
)
}
`
Expand Down
5 changes: 2 additions & 3 deletions assets/terraform/test/resource_ethernet_interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func makePanosEthernetInterface_Layer3(label string) string {
variable "ip_addr_netmask" { type = string }
variable "template_name" { type = string }
resource "panos_panorama_template" "acc_codegen_template" {
resource "panos_template" "acc_codegen_template" {
name = "${var.template_name}-${var.name_suffix}"
location = {
Expand All @@ -84,7 +84,7 @@ func makePanosEthernetInterface_Layer3(label string) string {
location = {
template = {
vsys = "vsys1"
name = panos_panorama_template.acc_codegen_template.name
name = panos_template.acc_codegen_template.name
}
}
Expand Down Expand Up @@ -141,4 +141,3 @@ func testAccCheckPanosEthernetInterfaceDestroy(entryName, templateName string) f
return nil
}
}

4 changes: 2 additions & 2 deletions assets/terraform/test/resource_panorama_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestAccPanosTemplate_RequiredInputs(t *testing.T) {
},
ConfigStateChecks: []statecheck.StateCheck{
statecheck.ExpectKnownValue(
"panos_panorama_template."+resourceName,
"panos_template."+resourceName,
tfjsonpath.New("name"),
knownvalue.StringExact(templateName),
),
Expand All @@ -50,7 +50,7 @@ func makePanosTemplateConfig(label string) string {
configTpl := `
variable "template_name" { type = string }
resource "panos_panorama_template" "%s" {
resource "panos_template" "%s" {
name = var.template_name
location = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ func TestAccPanosPanoramaTemplateVariable(t *testing.T) {
},
ConfigStateChecks: []statecheck.StateCheck{
statecheck.ExpectKnownValue(
"panos_panorama_template_variable."+resourceName,
"panos_template_variable."+resourceName,
tfjsonpath.New("type").AtMapKey(testEntry.variableType),
knownvalue.StringExact(testEntry.value),
),
statecheck.ExpectKnownValue(
"panos_panorama_template_variable."+resourceName,
"panos_template_variable."+resourceName,
tfjsonpath.New("name"),
knownvalue.StringExact("$tempvar-"+nameSuffix),
),
compareValuesDiffer.AddStateValue(
"panos_panorama_template_variable."+resourceName,
"panos_template_variable."+resourceName,
tfjsonpath.New("type"),
),
},
Expand All @@ -92,7 +92,7 @@ func makePanoramaTemplateVariableConfig(label string) string {
variable "templ_var_value" { type = string }
variable "templ_name" { type = string }
resource "panos_panorama_template" "%s" {
resource "panos_template" "%s" {
name = "${var.templ_name}_${var.name_suffix}"
location = {
Expand All @@ -102,10 +102,10 @@ func makePanoramaTemplateVariableConfig(label string) string {
}
}
resource "panos_panorama_template_variable" "%s" {
resource "panos_template_variable" "%s" {
location = {
template = {
name = panos_panorama_template.%s.name
name = panos_template.%s.name
}
}
Expand Down Expand Up @@ -142,4 +142,3 @@ func testAccPanosPanoramaTemplateVariableDestroy(entryName, templateName string)
return nil
}
}

6 changes: 3 additions & 3 deletions assets/terraform/test/resource_virtual_router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func makePanosVirtualRouterConfig(label string) string {
default = "ethernet1/40"
}
resource "panos_panorama_template" "template" {
resource "panos_template" "template" {
name = "${var.template_name}-${var.name_suffix}"
location = {
Expand All @@ -133,7 +133,7 @@ func makePanosVirtualRouterConfig(label string) string {
location = {
template = {
vsys = "vsys1"
name = panos_panorama_template.template.name
name = panos_template.template.name
}
}
Expand Down Expand Up @@ -166,7 +166,7 @@ func makePanosVirtualRouterConfig(label string) string {
resource "panos_virtual_router" "%s" {
location = {
template = {
name = panos_panorama_template.template.name
name = panos_template.template.name
}
}
Expand Down

0 comments on commit 3cfa125

Please sign in to comment.