Skip to content

Commit

Permalink
Updating testing to use sdwan_policy_object_feature_profile
Browse files Browse the repository at this point in the history
  • Loading branch information
seconroy committed Jun 7, 2024
1 parent fbbf94e commit e73a47d
Show file tree
Hide file tree
Showing 30 changed files with 270 additions and 140 deletions.
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_class_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -21,8 +20,8 @@ attributes:
example: 0
minimum_test_value: 0

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_color.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -21,8 +20,8 @@ attributes:
example: blue
minimum_test_value: '"blue"'

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -25,8 +24,8 @@ attributes:
example: 64
minimum_test_value: '64'

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_data_prefix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -25,8 +24,8 @@ attributes:
example: 8
minimum_test_value: '8'

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -22,8 +21,8 @@ attributes:
example: "soo 10.0.0.1:30"
minimum_test_value: '"soo 10.0.0.1:30"'

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_ipv6_prefix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -30,8 +29,8 @@ attributes:
- model_name: geRangePrefixLength
example: 70

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_mirror.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -28,8 +27,8 @@ attributes:
example: 10.0.0.2
minimum_test_value: '"10.0.0.2"'

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_policer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -34,8 +33,8 @@ attributes:
example: 60000
minimum_test_value: '60000'

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_prefix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -30,8 +29,8 @@ attributes:
- model_name: geRangePrefixLength
example: 16

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
13 changes: 6 additions & 7 deletions gen/definitions/profile_parcels/policy_object_tloc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: '"e4d9392a-7765-4a64-b719-a4bcaf534f25"'
# test_value: sdwan_policy_object_feature_profile.test.id
test_value: sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
Expand All @@ -32,8 +31,8 @@ attributes:
- model_name: preference
example: 33

# test_prerequisites: |
# resource "sdwan_policy_object_feature_profile" "test" {
# name = "TF_TEST"
# description = "Terraform test"
# }
test_prerequisites: |
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestAccDataSourceSdwanPolicyObjectClassMapProfileParcel(t *testing.T) {
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccDataSourceSdwanPolicyObjectClassMapProfileParcelConfig(),
Config: testAccDataSourceSdwanPolicyObjectClassMapPrerequisitesProfileParcelConfig + testAccDataSourceSdwanPolicyObjectClassMapProfileParcelConfig(),
Check: resource.ComposeTestCheckFunc(checks...),
},
},
Expand All @@ -49,14 +49,21 @@ func TestAccDataSourceSdwanPolicyObjectClassMapProfileParcel(t *testing.T) {
// End of section. //template:end testAccDataSource

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
const testAccDataSourceSdwanPolicyObjectClassMapPrerequisitesProfileParcelConfig = `
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
`

// End of section. //template:end testPrerequisites

// Section below is generated&owned by "gen/generator.go". //template:begin testAccDataSourceConfig
func testAccDataSourceSdwanPolicyObjectClassMapProfileParcelConfig() string {
config := `resource "sdwan_policy_object_class_map_profile_parcel" "test" {` + "\n"
config += ` name = "TF_TEST"` + "\n"
config += ` description = "Terraform integration test"` + "\n"
config += ` feature_profile_id = "e4d9392a-7765-4a64-b719-a4bcaf534f25"` + "\n"
config += ` feature_profile_id = sdwan_policy_object_feature_profile.test.id` + "\n"
config += ` entries = [{` + "\n"
config += ` queue = "0"` + "\n"
config += ` }]` + "\n"
Expand All @@ -65,7 +72,7 @@ func testAccDataSourceSdwanPolicyObjectClassMapProfileParcelConfig() string {
config += `
data "sdwan_policy_object_class_map_profile_parcel" "test" {
id = sdwan_policy_object_class_map_profile_parcel.test.id
feature_profile_id = "e4d9392a-7765-4a64-b719-a4bcaf534f25"
feature_profile_id = sdwan_policy_object_feature_profile.test.id
}
`
return config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestAccDataSourceSdwanPolicyObjectColorProfileParcel(t *testing.T) {
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccDataSourceSdwanPolicyObjectColorProfileParcelConfig(),
Config: testAccDataSourceSdwanPolicyObjectColorPrerequisitesProfileParcelConfig + testAccDataSourceSdwanPolicyObjectColorProfileParcelConfig(),
Check: resource.ComposeTestCheckFunc(checks...),
},
},
Expand All @@ -49,14 +49,21 @@ func TestAccDataSourceSdwanPolicyObjectColorProfileParcel(t *testing.T) {
// End of section. //template:end testAccDataSource

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
const testAccDataSourceSdwanPolicyObjectColorPrerequisitesProfileParcelConfig = `
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
`

// End of section. //template:end testPrerequisites

// Section below is generated&owned by "gen/generator.go". //template:begin testAccDataSourceConfig
func testAccDataSourceSdwanPolicyObjectColorProfileParcelConfig() string {
config := `resource "sdwan_policy_object_color_profile_parcel" "test" {` + "\n"
config += ` name = "TF_TEST"` + "\n"
config += ` description = "Terraform integration test"` + "\n"
config += ` feature_profile_id = "e4d9392a-7765-4a64-b719-a4bcaf534f25"` + "\n"
config += ` feature_profile_id = sdwan_policy_object_feature_profile.test.id` + "\n"
config += ` entries = [{` + "\n"
config += ` color = "blue"` + "\n"
config += ` }]` + "\n"
Expand All @@ -65,7 +72,7 @@ func testAccDataSourceSdwanPolicyObjectColorProfileParcelConfig() string {
config += `
data "sdwan_policy_object_color_profile_parcel" "test" {
id = sdwan_policy_object_color_profile_parcel.test.id
feature_profile_id = "e4d9392a-7765-4a64-b719-a4bcaf534f25"
feature_profile_id = sdwan_policy_object_feature_profile.test.id
}
`
return config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestAccDataSourceSdwanPolicyObjectDataIPv6PrefixProfileParcel(t *testing.T)
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccDataSourceSdwanPolicyObjectDataIPv6PrefixProfileParcelConfig(),
Config: testAccDataSourceSdwanPolicyObjectDataIPv6PrefixPrerequisitesProfileParcelConfig + testAccDataSourceSdwanPolicyObjectDataIPv6PrefixProfileParcelConfig(),
Check: resource.ComposeTestCheckFunc(checks...),
},
},
Expand All @@ -50,14 +50,21 @@ func TestAccDataSourceSdwanPolicyObjectDataIPv6PrefixProfileParcel(t *testing.T)
// End of section. //template:end testAccDataSource

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
const testAccDataSourceSdwanPolicyObjectDataIPv6PrefixPrerequisitesProfileParcelConfig = `
resource "sdwan_policy_object_feature_profile" "test" {
name = "TF_TEST"
description = "Terraform test"
}
`

// End of section. //template:end testPrerequisites

// Section below is generated&owned by "gen/generator.go". //template:begin testAccDataSourceConfig
func testAccDataSourceSdwanPolicyObjectDataIPv6PrefixProfileParcelConfig() string {
config := `resource "sdwan_policy_object_data_ipv6_prefix_profile_parcel" "test" {` + "\n"
config += ` name = "TF_TEST"` + "\n"
config += ` description = "Terraform integration test"` + "\n"
config += ` feature_profile_id = "e4d9392a-7765-4a64-b719-a4bcaf534f25"` + "\n"
config += ` feature_profile_id = sdwan_policy_object_feature_profile.test.id` + "\n"
config += ` entries = [{` + "\n"
config += ` ipv6_address = "2001:db8:85a3::8a2e:370:7334"` + "\n"
config += ` ipv6_prefix_length = 64` + "\n"
Expand All @@ -67,7 +74,7 @@ func testAccDataSourceSdwanPolicyObjectDataIPv6PrefixProfileParcelConfig() strin
config += `
data "sdwan_policy_object_data_ipv6_prefix_profile_parcel" "test" {
id = sdwan_policy_object_data_ipv6_prefix_profile_parcel.test.id
feature_profile_id = "e4d9392a-7765-4a64-b719-a4bcaf534f25"
feature_profile_id = sdwan_policy_object_feature_profile.test.id
}
`
return config
Expand Down
Loading

0 comments on commit e73a47d

Please sign in to comment.