Skip to content

Commit 9a5ed51

Browse files
alexng-canuckcodycushing
authored andcommitted
Fix identity tag test to avoid conflict with tag namespace tests
Tag namespace tests use BillingTags namespace and modifies it. Tag tests were using the same namespace, causing race condition failures when running them in parallel.
1 parent cdf6920 commit 9a5ed51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

oci/identity_tag_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var (
3838
generateResourceFromRepresentationMap("oci_identity_tag", "test_tag", Required, Create, tagRepresentation)
3939

4040
tagDataSourceRepresentation = map[string]interface{}{
41-
"tag_namespace_id": Representation{repType: Required, create: `${oci_identity_tag_namespace.test_tag_namespace.id}`},
41+
"tag_namespace_id": Representation{repType: Required, create: `${oci_identity_tag_namespace.tag-namespace1.id}`},
4242
"filter": RepresentationGroup{Required, tagDataSourceFilterRepresentation}}
4343
tagDataSourceFilterRepresentation = map[string]interface{}{
4444
"name": Representation{repType: Required, create: `id`},
@@ -48,13 +48,13 @@ var (
4848
tagRepresentation = map[string]interface{}{
4949
"description": Representation{repType: Required, create: `This tag will show the cost center that will be used for billing of associated resources.`, update: `description2`},
5050
"name": Representation{repType: Required, create: `CostCenter`},
51-
"tag_namespace_id": Representation{repType: Required, create: `${oci_identity_tag_namespace.test_tag_namespace.id}`},
51+
"tag_namespace_id": Representation{repType: Required, create: `${oci_identity_tag_namespace.tag-namespace1.id}`},
5252
"defined_tags": Representation{repType: Optional, create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
5353
"freeform_tags": Representation{repType: Optional, create: map[string]string{"Department": "Finance"}, update: map[string]string{"Department": "Accounting"}},
5454
"is_cost_tracking": Representation{repType: Optional, create: `false`, update: `true`},
5555
}
5656

57-
TagResourceDependencies = TagNamespaceRequiredOnlyResource
57+
TagResourceDependencies = DefinedTagsDependencies
5858
)
5959

6060
func TestIdentityTagResource_basic(t *testing.T) {

0 commit comments

Comments
 (0)