auth0 / auth0-cli

Build, manage and test your Auth0 integrations from the command line
https://auth0.github.io/auth0-cli/
MIT License
243 stars 52 forks source link

Adding request pagination to `auth0 logs list` #939

Closed willvedd closed 9 months ago

willvedd commented 9 months ago

🔧 Changes

As noted by #936 , the auth0 logs list command's --number flag does not have an effect for any value above 100. This PR introduces a pagination mechanism such that the correct number of logs are requested.

📚 References

Related issue: #936

🔬 Testing

Added integration test cases .

However, the test tenant won't reliably have a high number of logs, which makes testing the pagination functionality tricky. For these cases, I tested locally against my tenant with --number equaling 1,499,500,501 and 1000.

📝 Checklist

codecov-commenter commented 9 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (93f54e2) 71.95% compared to head (6f6ded4) 72.05%.

Files Patch % Lines
internal/cli/logs.go 90.90% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #939 +/- ## ========================================== + Coverage 71.95% 72.05% +0.09% ========================================== Files 92 92 Lines 12577 12595 +18 ========================================== + Hits 9050 9075 +25 + Misses 2984 2977 -7 Partials 543 543 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.