@@ -17,13 +17,14 @@ import (
1717 "strings"
1818 "testing"
1919
20+ "github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
2021 "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
2122 "github.com/hashicorp/terraform-plugin-sdk/terraform"
2223)
2324
2425func TestAccSumologicFieldExtractionRule_basic (t * testing.T ) {
2526 var fieldextractionrule FieldExtractionRule
26- testName := FieldsMap ["FieldExtractionRule" ]["name" ]
27+ testName := FieldsMap ["FieldExtractionRule" ]["name" + acctest . RandString ( 8 ) ]
2728 testScope := FieldsMap ["FieldExtractionRule" ]["scope" ]
2829 testParseExpression := FieldsMap ["FieldExtractionRule" ]["parseExpression" ]
2930 testEnabled , _ := strconv .ParseBool (FieldsMap ["FieldExtractionRule" ]["enabled" ])
@@ -47,7 +48,7 @@ func TestAccSumologicFieldExtractionRule_basic(t *testing.T) {
4748
4849func TestAccSumologicFieldExtractionRule_create (t * testing.T ) {
4950 var fieldextractionrule FieldExtractionRule
50- testName := FieldsMap ["FieldExtractionRule" ]["name" ]
51+ testName := FieldsMap ["FieldExtractionRule" ]["name" + acctest . RandString ( 8 ) ]
5152 testScope := FieldsMap ["FieldExtractionRule" ]["scope" ]
5253 testParseExpression := FieldsMap ["FieldExtractionRule" ]["parseExpression" ]
5354 testEnabled , _ := strconv .ParseBool (FieldsMap ["FieldExtractionRule" ]["enabled" ])
@@ -114,12 +115,13 @@ func testAccCheckFieldExtractionRuleExists(name string, fieldextractionrule *Fie
114115
115116func TestAccSumologicFieldExtractionRule_update (t * testing.T ) {
116117 var fieldextractionrule FieldExtractionRule
117- testName := FieldsMap ["FieldExtractionRule" ]["name" ]
118+ randomSuffix := acctest .RandString (8 )
119+ testName := FieldsMap ["FieldExtractionRule" ]["name" + randomSuffix ]
118120 testScope := FieldsMap ["FieldExtractionRule" ]["scope" ]
119121 testParseExpression := FieldsMap ["FieldExtractionRule" ]["parseExpression" ]
120122 testEnabled , _ := strconv .ParseBool (FieldsMap ["FieldExtractionRule" ]["enabled" ])
121123
122- testUpdatedName := FieldsMap ["FieldExtractionRule" ]["updatedName" ]
124+ testUpdatedName := FieldsMap ["FieldExtractionRule" ]["updatedName" + randomSuffix ]
123125 testUpdatedScope := FieldsMap ["FieldExtractionRule" ]["updatedScope" ]
124126 testUpdatedParseExpression := FieldsMap ["FieldExtractionRule" ]["updatedParseExpression" ]
125127 testUpdatedEnabled , _ := strconv .ParseBool (FieldsMap ["FieldExtractionRule" ]["updatedEnabled" ])
0 commit comments