Skip to content

Conversation

@wneessen
Copy link
Owner

@wneessen wneessen commented Nov 1, 2024

This PR improves the tests for random.go and senderror.go for better test coverage.

Winni Neessen added 5 commits November 1, 2024 15:24
Refactored the test for `randomStringSecure` to better organize test cases using subtests. Added new test cases to check failures with a broken rand.Reader, improving test coverage and robustness.
Replaced constant with named error for readability and maintainability in the error handling condition. Adjusted error message formatting by removing an extra space for consistency.
Consolidated multiple duplicate test cases into grouped sub-tests with clear names. This enhances readability and maintainability, ensures proper test isolation, and removes redundant code.
This change ensures that the output of the apt-get commands is no longer redirected to /dev/null. This aids in debugging by making command outputs visible in the CI logs.
The `sudo apt-get -y upgrade` command was removed from the CI workflow's "Install sendmail" step. This change simplifies the installation process by ensuring only the necessary updates and installations are performed, which can contribute to faster and more reliable CI runs.
@codecov
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.74%. Comparing base (d7e0b48) to head (ec10e0b).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
+ Coverage   91.50%   91.74%   +0.23%     
==========================================
  Files          27       27              
  Lines        2944     2944              
==========================================
+ Hits         2694     2701       +7     
+ Misses        177      172       -5     
+ Partials       73       71       -2     

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

@wneessen wneessen merged commit 9ca7d24 into main Nov 1, 2024
29 checks passed
@wneessen wneessen deleted the more-test-improvements branch November 1, 2024 15:39
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