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

package provider

import (
	"testing"

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

func TestAccSdwanCiscoThousandEyesFeatureTemplate(t *testing.T) {
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccSdwanCiscoThousandEyesFeatureTemplateConfig_minimum(),
				Check:  resource.ComposeTestCheckFunc(),
			},
			{
				Config: testAccSdwanCiscoThousandEyesFeatureTemplateConfig_all(),
				Check: resource.ComposeTestCheckFunc(
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.instance_id", "1"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.application_type", "te"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_account_group_token", "1234567"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_vpn", "1"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_agent_ip", "1.1.1.2/24"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_default_gateway", "1.1.1.255"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_name_server", "10.2.2.2"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_hostname", "agent1"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_web_proxy_type", "static"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_proxy_host", "3.3.3.3"),
					resource.TestCheckResourceAttr("sdwan_cisco_thousandeyes_feature_template.test", "virtual_applications.0.te_proxy_port", "80"),
				),
			},
		},
	})
}

func testAccSdwanCiscoThousandEyesFeatureTemplateConfig_minimum() string {
	return `
	resource "sdwan_cisco_thousandeyes_feature_template" "test" {
		name = "TF_TEST_MIN"
		description = "Terraform integration test"
		device_types = ["vedge-C8000V"]
	}
	`
}

func testAccSdwanCiscoThousandEyesFeatureTemplateConfig_all() string {
	return `
	resource "sdwan_cisco_thousandeyes_feature_template" "test" {
		name = "TF_TEST_ALL"
		description = "Terraform integration test"
		device_types = ["vedge-C8000V"]
		virtual_applications = [{
			instance_id = "1"
			application_type = "te"
			te_account_group_token = "1234567"
			te_vpn = 1
			te_agent_ip = "1.1.1.2/24"
			te_default_gateway = "1.1.1.255"
			te_name_server = "10.2.2.2"
			te_hostname = "agent1"
			te_web_proxy_type = "static"
			te_proxy_host = "3.3.3.3"
			te_proxy_port = 80
		}]
	}
	`
}
