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

feat: Add Papercut module #1044

Merged
merged 11 commits into from
Nov 15, 2023
Merged

Conversation

TechLiam
Copy link
Contributor

@TechLiam TechLiam commented Nov 8, 2023

What does this PR do?

Add Testcontainers.Papercut

Why is it important?

Papercut is a testing SMTP server that also has a nice, easy REST API to get the messages in the inbox.
When doing integration testing it is helpful to be able to send emails and have the ability to check their contents by having this container developers will be able to quickly spin up an SMTP server and check the messages delivered to it without having to send emails to a proper SMTP server and email address.

How to test this PR

Unit/Integration tests have been added to the solution that checks the container starts and can have emails sent to it. It also checks the helper methods for getting the emails delivered back out of Papercut from the REST API.

Copy link

netlify bot commented Nov 8, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 840198e
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/655505705f496c00088a2915
😎 Deploy Preview https://deploy-preview-1044--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@TechLiam TechLiam marked this pull request as ready for review November 8, 2023 19:41
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. Definitely a cool module. Can we please remove the Papercut client functionalities? This isn't the responsibility of Testcontainers.

src/Testcontainers.Papercut/PapercutContainer.cs Outdated Show resolved Hide resolved
src/Testcontainers.Papercut/PapercutBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Papercut/PapercutBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Papercut/PapercutBuilder.cs Outdated Show resolved Hide resolved
TechLiam and others added 4 commits November 12, 2023 17:13
Moved client models to test project as this uses them but it not used in package project now
Added constants for Port numbers
Moved using statements to Usings.cs file
Added delegate for getting public SMTP port number
@TechLiam
Copy link
Contributor Author

@HofmeisterAn is there anything else or is this PR good to merge now?

@HofmeisterAn
Copy link
Collaborator

@HofmeisterAn is there anything else or is this PR good to merge now?

I've made some improvements. WDYT? If you're good with it, we are ready to merge.

HofmeisterAn
HofmeisterAn previously approved these changes Nov 15, 2023
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you're good with the recent changes. Thanks for the pull request. Great first Testcontainers contribution 👍. I will merge it later the day.

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Nov 15, 2023
@HofmeisterAn HofmeisterAn changed the title Added Papercut module feat: Add Papercut module Nov 15, 2023
@HofmeisterAn HofmeisterAn merged commit 1f3daa7 into testcontainers:develop Nov 15, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants