// Code generated by "gen/generator.go"; DO NOT EDIT.

package provider

import (
	"testing"

	"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)

func TestAccDataSourceSdwanPreferredColorGroupPolicyObject(t *testing.T) {
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccDataSourceSdwanPreferredColorGroupPolicyObjectConfig,
				Check: resource.ComposeTestCheckFunc(
					resource.TestCheckResourceAttr("data.sdwan_preferred_color_group_policy_object.test", "entries.0.primary_color_preference", "blue bronze"),
					resource.TestCheckResourceAttr("data.sdwan_preferred_color_group_policy_object.test", "entries.0.primary_path_preference", "direct-path"),
					resource.TestCheckResourceAttr("data.sdwan_preferred_color_group_policy_object.test", "entries.0.secondary_color_preference", "3g"),
					resource.TestCheckResourceAttr("data.sdwan_preferred_color_group_policy_object.test", "entries.0.secondary_path_preference", "multi-hop-path"),
					resource.TestCheckResourceAttr("data.sdwan_preferred_color_group_policy_object.test", "entries.0.tertiary_color_preference", "custom1"),
					resource.TestCheckResourceAttr("data.sdwan_preferred_color_group_policy_object.test", "entries.0.tertiary_path_preference", "all-paths"),
				),
			},
		},
	})
}

const testAccDataSourceSdwanPreferredColorGroupPolicyObjectConfig = `

resource "sdwan_preferred_color_group_policy_object" "test" {
  name = "TF_TEST_MIN"
  entries = [{
    primary_color_preference = "blue bronze"
    primary_path_preference = "direct-path"
    secondary_color_preference = "3g"
    secondary_path_preference = "multi-hop-path"
    tertiary_color_preference = "custom1"
    tertiary_path_preference = "all-paths"
  }]
}

data "sdwan_preferred_color_group_policy_object" "test" {
  id = sdwan_preferred_color_group_policy_object.test.id
}
`
