chore: make names of synthetics entities created in tests consistent #1067
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.
In multiple tests used in the
synthetics
package which end up creating/updating/deleting Synthetic Monitors, Private Locations and Secure Credentials, the names of resources created are currently not consistent -newrelic-client-go
.mock.RandSeq(5)
as the name of the entity.This makes it difficult to track down redundant Synthetic entities in the account which may have not been deleted successfully owing to test failures or other similar reasons, and which would need to be cleaned up (given, in recent times, a large number of redundant monitors created by the client's test which remained and did not get deleted, led to the limit of Synthetic Checks getting breached).
Hence, this PR addresses a tiny change to all tests in the
synthetics
package - make the names of entities created uniform, with a identifierclient-go-test
that helps identify that the entities were created fromnewrelic-client-go
's tests.