@@ -46,30 +46,6 @@ func TestAccResourceIntegrationPolicyMultipleAgentPolicies(t *testing.T) {
46
46
})
47
47
}
48
48
49
- func TestAccResourceIntegrationPolicyBothAgentPolicyFields (t * testing.T ) {
50
- policyName := sdkacctest .RandStringFromCharSet (22 , sdkacctest .CharSetAlphaNum )
51
-
52
- resource .Test (t , resource.TestCase {
53
- PreCheck : func () { acctest .PreCheck (t ) },
54
- CheckDestroy : checkResourceIntegrationPolicyDestroy ,
55
- ProtoV6ProviderFactories : acctest .Providers ,
56
- Steps : []resource.TestStep {
57
- {
58
- SkipFunc : versionutils .CheckIfVersionIsUnsupported (minVersionIntegrationPolicyIds ),
59
- Config : testAccResourceIntegrationPolicyCreateWithBothAgentPolicyFields (policyName ),
60
- Check : resource .ComposeTestCheckFunc (
61
- resource .TestCheckResourceAttr ("elasticstack_fleet_integration_policy.test_policy" , "name" , policyName ),
62
- resource .TestCheckResourceAttr ("elasticstack_fleet_integration_policy.test_policy" , "description" , "IntegrationPolicyTest Policy" ),
63
- resource .TestCheckResourceAttr ("elasticstack_fleet_integration_policy.test_policy" , "integration_name" , "tcp" ),
64
- resource .TestCheckResourceAttr ("elasticstack_fleet_integration_policy.test_policy" , "integration_version" , "1.16.0" ),
65
- resource .TestCheckResourceAttrSet ("elasticstack_fleet_integration_policy.test_policy" , "agent_policy_id" ),
66
- resource .TestCheckResourceAttr ("elasticstack_fleet_integration_policy.test_policy" , "agent_policy_ids.#" , "1" ),
67
- ),
68
- },
69
- },
70
- })
71
- }
72
-
73
49
func TestJsonTypes (t * testing.T ) {
74
50
mapBytes , err := json .Marshal (map [string ]string {})
75
51
require .NoError (t , err )
@@ -557,38 +533,3 @@ resource "elasticstack_fleet_integration_policy" "test_policy" {
557
533
}
558
534
` , id , id , id )
559
535
}
560
-
561
- func testAccResourceIntegrationPolicyCreateWithBothAgentPolicyFields (id string ) string {
562
- return fmt .Sprintf (`
563
- provider "elasticstack" {
564
- elasticsearch {}
565
- kibana {}
566
- }
567
- resource "elasticstack_fleet_integration" "test_policy" {
568
- name = "tcp"
569
- version = "1.16.0"
570
- force = true
571
- }
572
- resource "elasticstack_fleet_agent_policy" "test_policy" {
573
- name = "%s Agent Policy"
574
- namespace = "default"
575
- description = "IntegrationPolicyTest Agent Policy"
576
- monitor_logs = true
577
- monitor_metrics = true
578
- skip_destroy = false
579
- }
580
- resource "elasticstack_fleet_integration_policy" "test_policy" {
581
- name = "%s"
582
- namespace = "default"
583
- description = "IntegrationPolicyTest Policy"
584
- agent_policy_id = elasticstack_fleet_agent_policy.test_policy.policy_id
585
- agent_policy_ids = [elasticstack_fleet_agent_policy.test_policy.policy_id]
586
- integration_name = elasticstack_fleet_integration.test_policy.name
587
- integration_version = elasticstack_fleet_integration.test_policy.version
588
- input {
589
- input_id = "tcp-tcp"
590
- enabled = true
591
- }
592
- }
593
- ` , id , id )
594
- }
0 commit comments