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

package provider

import (
	"testing"

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

func TestAccSdwanPolicerPolicyObject(t *testing.T) {
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccSdwanPolicerPolicyObjectConfig_all(),
				Check: resource.ComposeTestCheckFunc(
					resource.TestCheckResourceAttr("sdwan_policer_policy_object.test", "entries.0.burst", "100000"),
					resource.TestCheckResourceAttr("sdwan_policer_policy_object.test", "entries.0.exceed_action", "remark"),
					resource.TestCheckResourceAttr("sdwan_policer_policy_object.test", "entries.0.rate", "100"),
				),
			},
		},
	})
}

func testAccSdwanPolicerPolicyObjectConfig_all() string {
	return `
	resource "sdwan_policer_policy_object" "test" {
		name = "TF_TEST_ALL"
		entries = [{
			burst = 100000
			exceed_action = "remark"
			rate = 100
		}]
	}
	`
}
