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
Enable cross-platform Send-MailMessage tests for CI #8859
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.
LGTM with one comment.
test/powershell/Modules/Microsoft.PowerShell.Utility/Send-MailMessage.Tests.ps1
Outdated
Show resolved
Hide resolved
@adityapatwardhan Please look the PR. |
test/powershell/Modules/Microsoft.PowerShell.Utility/Send-MailMessage.Tests.ps1
Outdated
Show resolved
Hide resolved
@ThreeFive-O The changes looks great, just added a comment for improving performance slightly. Everything else looks good. |
Use NuGet V3 API as package source;
@adityapatwardhan Please review #9031 . I think we should still take this PR |
@adityapatwardhan and @TravisEz13 Not sure why my CLA status is still not reported, but all other checks have passed. |
@ThreeFive-O No worries, we got status on this commit: 0686809 |
PR Summary
Fixes #3950
This PR contains a cross-platform SMTP server mockup which allows to run the Send-MailMessage tests on the PowerShell CI system (Azure DevOps pipeline) as well as on local development machines for all supported platforms.
This PR includes:
RequireSudoOnUnix
tag as Linux and macOS on CI requires sudo for privileged port 25 (SMTP)PR Context
Before this PR the Send-MailMessage tests run only on local Linux development machines when a local SMTP server is set up and running.
This is rather inconvenient for testing because:
The Azure DevOps pipeline VMs don't have any local SMTP server set up. Therefore the tests for Send-MailMessage are skipped during CI checks.
This PR will provide a way to run the tests on the Azure DevOps pipeline for Windows, Linux and macOS as well on local development machines.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.[feature]
to your commit messages if the change is significant or affects feature tests