View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032828 | mantisbt | tools | public | 2023-08-15 03:54 | 2023-10-31 16:32 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0032828: TravisCI ' /usr/sbin/sendmail: not found' error after successful test execution | ||||
Description | After PHPUnit tests execution completes successfully, several occurrences of error They are triggered as the MantisBT core calls email_shutdown_function(). This is not a "real" error and does not actually cause the build to fail, but it could lead someone reviewing the build's log to think that something went wrong, so it should be fixed to avoid confusion. | ||||
Additional Information | Example job https://app.travis-ci.com/github/mantisbt/mantisbt/jobs/607675572#L608
| ||||
Tags | No tags attached. | ||||
sendmail command is not available on TravisCI, to avoid this error the easiest solution is to setup a mail sink / fake sendmail command. PHPMailer does something similar for running their own unit tests. See https://github.com/PHPMailer/PHPMailer/tree/57f994d89eacac82dd0e40e4657eb6054136a7ea/examples#about-testing-email-sending |
|
MantisBT: master 9224acb6 2023-08-14 11:26 Details Diff |
Use fake sendmail script for TravisCI builds This avoids 'sh: 1: /usr/sbin/sendmail: not found' error message displayed after PHPUnit suite execution, as sendmail is not installed on Travis. Note: This is not a "real" error and does not actually cause the build to fail, but it could lead someone reviewing the build's log to think that something went wrong, so it should be fixed to avoid confusion. The fakesendmail.sh script was copied from PHPMailer's test suite [1]. It will generate a .eml file in /tmp/fakemail directory, each time the test suite sends an email. Fixes 0032828 [1]: https://github.com/PHPMailer/PHPMailer/blob/v6.8.0/test/fakesendmail.sh |
Affected Issues 0032828 |
|
mod - .travis.yml | Diff File | ||
add - tests/fakesendmail.sh | Diff File |