@@ -19,11 +19,12 @@ import (
1919
2020 "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
2121 "github.com/hashicorp/terraform-plugin-sdk/terraform"
22+ "github.com/hashicorp/terraform/helper/acctest"
2223)
2324
2425func TestAccSumologicRole_basic (t * testing.T ) {
2526 var role Role
26- testName := FieldsMap [ "Role" ][ "name" ]
27+ testName := acctest . RandomWithPrefix ( "tf-acc-test" )
2728 testDescription := FieldsMap ["Role" ]["description" ]
2829 testFilterPredicate := FieldsMap ["Role" ]["filterPredicate" ]
2930 testCapabilities := []string {"\" " + FieldsMap ["Role" ]["capabilities" ] + "\" " }
@@ -47,7 +48,7 @@ func TestAccSumologicRole_basic(t *testing.T) {
4748
4849func TestAccRole_create (t * testing.T ) {
4950 var role Role
50- testName := FieldsMap [ "Role" ][ "name" ]
51+ testName := acctest . RandomWithPrefix ( "tf-acc-test" )
5152 testDescription := FieldsMap ["Role" ]["description" ]
5253 testFilterPredicate := FieldsMap ["Role" ]["filterPredicate" ]
5354 testCapabilities := []string {"\" " + FieldsMap ["Role" ]["capabilities" ] + "\" " }
@@ -114,12 +115,12 @@ func testAccCheckRoleExists(name string, role *Role, t *testing.T) resource.Test
114115
115116func TestAccRole_update (t * testing.T ) {
116117 var role Role
117- testName := FieldsMap [ "Role" ][ "name" ]
118+ testName := acctest . RandomWithPrefix ( "tf-acc-test" )
118119 testDescription := FieldsMap ["Role" ]["description" ]
119120 testFilterPredicate := FieldsMap ["Role" ]["filterPredicate" ]
120121 testCapabilities := []string {"\" " + FieldsMap ["Role" ]["capabilities" ] + "\" " }
121122
122- testUpdatedName := FieldsMap [ "Role" ][ "updatedName" ]
123+ testUpdatedName := acctest . RandomWithPrefix ( "tf-acc-test" )
123124 testUpdatedDescription := FieldsMap ["Role" ]["updatedDescription" ]
124125 testUpdatedFilterPredicate := FieldsMap ["Role" ]["updatedFilterPredicate" ]
125126 testUpdatedCapabilities := []string {"\" " + FieldsMap ["Role" ]["updatedCapabilities" ] + "\" " }
0 commit comments