@@ -162,11 +162,6 @@ func TestAccResourceAgentPolicy(t *testing.T) {
162162 resource .TestCheckNoResourceAttr ("elasticstack_fleet_agent_policy.test_policy" , "global_data_tags" ),
163163 ),
164164 },
165- {
166- SkipFunc : versionutils .CheckIfVersionIsUnsupported (minVersionGlobalDataTags ),
167- Config : testAccResourceAgentPolicyUpdateWithBadGlobalDataTags (policyNameGlobalDataTags , true ),
168- ExpectError : regexp .MustCompile (".*Error: Invalid Attribute Combination.*" ),
169- },
170165 },
171166 })
172167}
@@ -195,6 +190,23 @@ func TestAccResourceAgentPolicySkipDestroy(t *testing.T) {
195190 })
196191}
197192
193+ func TestAccResourceAgentPolicyWithBadGlobalDataTags (t * testing.T ) {
194+ policyName := sdkacctest .RandStringFromCharSet (22 , sdkacctest .CharSetAlphaNum )
195+
196+ resource .Test (t , resource.TestCase {
197+ PreCheck : func () { acctest .PreCheck (t ) },
198+ // CheckDestroy: func(s *state.State) { return nil },
199+ ProtoV6ProviderFactories : acctest .Providers ,
200+ Steps : []resource.TestStep {
201+ {
202+ SkipFunc : versionutils .CheckIfVersionIsUnsupported (minVersionGlobalDataTags ),
203+ Config : testAccResourceAgentPolicyUpdateWithBadGlobalDataTags (policyName , true ),
204+ ExpectError : regexp .MustCompile (".*Error: Invalid Attribute Combination.*" ),
205+ },
206+ },
207+ })
208+ }
209+
198210func testAccResourceAgentPolicyCreate (id string , skipDestroy bool ) string {
199211 return fmt .Sprintf (`
200212provider "elasticstack" {
0 commit comments