Refactor test files to use dynamic resource group names #483
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to the test files in the
internal/services/licensing
directory to ensure unique resource group names by appending a random number. The most important changes involve modifying the resource group names in various test functions and importing necessary packages.Test Function Updates:
internal/services/licensing/datasource_billing_policies_environments_test.go
: UpdatedTestAccBillingPoliciesEnvironmentsDataSource_Validate_Read
to append a random number to the resource group name usingstrconv.Itoa(rand.IntN(9999))
.internal/services/licensing/datasource_billing_policies_test.go
: UpdatedTestAccBillingPoliciesDataSource_Validate_Read
to append a random number to the resource group name.internal/services/licensing/resource_billing_policy_environment_test.go
: Updated several functions (TestAccBillingPolicyResourceEnvironment_Validate_Create
,TestAccBillingPolicyResourceEnvironment_Validate_Update
) to use a random number in the resource group name. [1] [2] [3] [4]internal/services/licensing/resource_billing_policy_test.go
: Updated multiple functions (TestAccBillingPolicyResource_Validate_Create
,TestAccBillingPolicy_Validate_Update
,TestAccBillingPolicy_Validate_Update_ForceRecreate
) to use a random number in the resource group name. [1] [2] [3] [4]Package Imports:
math/rand/v2
andstrconv
imports to several test files to facilitate the generation of random numbers for resource group names. [1] [2] [3] [4]