Skip to content

Commit

Permalink
Update testing on missed profile parcel
Browse files Browse the repository at this point in the history
  • Loading branch information
seconroy committed Jun 7, 2024
1 parent e73a47d commit 3b83c6d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ 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: expandedCommunityList
tf_name: expanded_community_lists
id: true
mandatory: true
example: abcd

# 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 @@ -38,7 +38,7 @@ func TestAccDataSourceSdwanPolicyObjectExpandedCommunityProfileParcel(t *testing
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccDataSourceSdwanPolicyObjectExpandedCommunityProfileParcelConfig(),
Config: testAccDataSourceSdwanPolicyObjectExpandedCommunityPrerequisitesProfileParcelConfig + testAccDataSourceSdwanPolicyObjectExpandedCommunityProfileParcelConfig(),
Check: resource.ComposeTestCheckFunc(checks...),
},
},
Expand All @@ -48,21 +48,28 @@ func TestAccDataSourceSdwanPolicyObjectExpandedCommunityProfileParcel(t *testing
// End of section. //template:end testAccDataSource

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
const testAccDataSourceSdwanPolicyObjectExpandedCommunityPrerequisitesProfileParcelConfig = `
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 testAccDataSourceSdwanPolicyObjectExpandedCommunityProfileParcelConfig() string {
config := `resource "sdwan_policy_object_expanded_community_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 += ` expanded_community_lists = ["abcd"]` + "\n"
config += `}` + "\n"

config += `
data "sdwan_policy_object_expanded_community_profile_parcel" "test" {
id = sdwan_policy_object_expanded_community_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 @@ -38,10 +38,10 @@ func TestAccSdwanPolicyObjectExpandedCommunityProfileParcel(t *testing.T) {
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccSdwanPolicyObjectExpandedCommunityProfileParcelConfig_minimum(),
Config: testAccSdwanPolicyObjectExpandedCommunityPrerequisitesProfileParcelConfig + testAccSdwanPolicyObjectExpandedCommunityProfileParcelConfig_minimum(),
},
{
Config: testAccSdwanPolicyObjectExpandedCommunityProfileParcelConfig_all(),
Config: testAccSdwanPolicyObjectExpandedCommunityPrerequisitesProfileParcelConfig + testAccSdwanPolicyObjectExpandedCommunityProfileParcelConfig_all(),
Check: resource.ComposeTestCheckFunc(checks...),
},
},
Expand All @@ -51,14 +51,21 @@ func TestAccSdwanPolicyObjectExpandedCommunityProfileParcel(t *testing.T) {
// End of section. //template:end testAcc

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
const testAccSdwanPolicyObjectExpandedCommunityPrerequisitesProfileParcelConfig = `
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 testAccConfigMinimum
func testAccSdwanPolicyObjectExpandedCommunityProfileParcelConfig_minimum() string {
config := `resource "sdwan_policy_object_expanded_community_profile_parcel" "test" {` + "\n"
config += ` name = "TF_TEST_MIN"` + "\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 += ` expanded_community_lists = ["abcd"]` + "\n"
config += `}` + "\n"
return config
Expand All @@ -71,7 +78,7 @@ func testAccSdwanPolicyObjectExpandedCommunityProfileParcelConfig_all() string {
config := `resource "sdwan_policy_object_expanded_community_profile_parcel" "test" {` + "\n"
config += ` name = "TF_TEST_ALL"` + "\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 += ` expanded_community_lists = ["abcd"]` + "\n"
config += `}` + "\n"
return config
Expand Down

0 comments on commit 3b83c6d

Please sign in to comment.