-
Notifications
You must be signed in to change notification settings - Fork 593
test(providers): make azure.TestUserAgent more robust
#4781
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
test(providers): make azure.TestUserAgent more robust
#4781
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes the azure.TestUserAgent test more robust by replacing a blocking channel operation with atomic variables and require.Eventually to prevent test hangs and timeouts. The changes also improve consistency across Azure provider tests by standardizing the use of testify assertions and testlogging.
- Replaced blocking channel receive with atomic bool and
require.Eventuallyfor non-blocking user agent verification - Standardized test context usage to
testlogging.Context(t)across Azure tests - Cleaned up error handling by consistently using testify assertions instead of manual error checking
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| repo/blob/azure/azure_test.go | Refactored TestUserAgent to use atomic variables and Eventually instead of blocking channels |
| repo/blob/azure/azure_storage_test.go | Standardized error handling with testify assertions and consistent context usage |
| .github/workflows/providers-core.yml | Removed unused environment variable for SAS token |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
FYI: @andrason |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4781 +/- ##
==========================================
+ Coverage 75.86% 76.39% +0.52%
==========================================
Files 470 530 +60
Lines 37301 40443 +3142
==========================================
+ Hits 28299 30896 +2597
- Misses 7071 7503 +432
- Partials 1931 2044 +113 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Leverage
require.Eventuallyto prevent indefinite test hangs / timeouts, removes blocking receive op on a channelAdditional cleanups:
testloggin.Context(t)testifypackageRefs:
azure.TestUserAgent#4780