Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make names of synthetics entities created in tests consistent #1067

Merged

Conversation

pranav-new-relic
Copy link
Member

@pranav-new-relic pranav-new-relic commented Nov 15, 2023

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 -

  • Very few of them have a string that helps identify that the source of the entity is newrelic-client-go.
  • A large number of them have no such identifier and simply have a 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 identifier client-go-test that helps identify that the entities were created from newrelic-client-go's tests.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1d2c76f) 39.08% compared to head (489097c) 67.43%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1067       +/-   ##
===========================================
+ Coverage   39.08%   67.43%   +28.35%     
===========================================
  Files          82      100       +18     
  Lines        5133     5884      +751     
===========================================
+ Hits         2006     3968     +1962     
+ Misses       2977     1594     -1383     
- Partials      150      322      +172     
Flag Coverage Δ
integration 58.53% <ø> (?)
unit 39.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pranav-new-relic pranav-new-relic force-pushed the fix/synthetics-integration-test-resource-names branch from 6602cf5 to 489097c Compare November 16, 2023 05:17
@pranav-new-relic
Copy link
Member Author

pranav-new-relic commented Nov 16, 2023

All tests successful (link to integration tests) 👍 however, it is worth mentioning (for anyone seeing this PR in future) that one specific test, TestIntegrationListTags is very flakey - locally running this tests seems to cause no failure, but this fails in the CI quite frequently, and then, randomly passes in the next one or two test runs.

Merging this PR shortly as this is a minor change (expected to cause no change to feature behaviour) and since all tests have passed successfully.

@pranav-new-relic pranav-new-relic marked this pull request as ready for review November 16, 2023 06:16
@pranav-new-relic pranav-new-relic merged commit 5f87eef into main Nov 16, 2023
9 checks passed
@pranav-new-relic pranav-new-relic deleted the fix/synthetics-integration-test-resource-names branch November 16, 2023 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants