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

🤖 Add tests for TokenlessAzureHandler timestamp handling #1069

Conversation

sentry-autofix[bot]
Copy link
Contributor

👋 Hi there! This PR was automatically generated by Autofix 🤖

This fix was triggered by Trent Schmidt

Fixes API-5YR

This change introduces a new test suite for the TokenlessAzureHandler's ability to correctly handle timestamps from the Azure DevOps API, focusing on nanosecond and microsecond precision. Three tests were added:

  1. test_verify_handles_nanosecond_timestamp: Verifies that the handler processes timestamps with nanosecond precision correctly.
  2. test_verify_handles_microsecond_timestamp: Ensures the handler works with standard microsecond precision timestamps.
  3. test_verify_rejects_old_timestamp: Checks that the handler rejects timestamps older than four minutes, utilizing a 7-digit nanosecond precision timestamp.
    Additionally, changes to azure.py ensure that nanosecond precision timestamps are truncated to six digits when processed, maintaining compatibility with Python's datetime handling.

If you have any questions or feedback for the Sentry team about this fix, please email [email protected] with the Run ID: 2538.

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@trent-codecov trent-codecov marked this pull request as ready for review December 20, 2024 15:07
@trent-codecov trent-codecov requested a review from a team as a code owner December 20, 2024 15:07
@trent-codecov trent-codecov added this pull request to the merge queue Dec 20, 2024
Merged via the queue into main with commit f80d9d2 Dec 20, 2024
16 of 17 checks passed
@trent-codecov trent-codecov deleted the autofix/add-tests-for-tokenlessazurehandler-timestamp-handling/e0eLbC branch December 20, 2024 15:37
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (ad92471) to head (1f4b054).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1069   +/-   ##
=======================================
  Coverage   96.02%   96.02%           
=======================================
  Files         828      828           
  Lines       19444    19447    +3     
=======================================
+ Hits        18671    18674    +3     
  Misses        773      773           
Flag Coverage Δ
unit 92.30% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 92.30% <100.00%> (+<0.01%) ⬆️

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.

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