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

Store the HTML and TEXT parts of a stored message in the mock server #323

Closed
wants to merge 1 commit into from

Conversation

itsdax
Copy link

@itsdax itsdax commented May 18, 2024

Mock Server currently drops the HTML and Text portions of the stored email. This allows users to place assertions on the contents of an email.

For example, my service wants to assert that it has successfully sent an email with a login verification code. This provides the capability to do so.

PTAL - Thanks!

@vtopc
Copy link
Contributor

vtopc commented Sep 26, 2024

@itsdax, hi.
The mockServer/MockServer was intended to be a mock for testing the github.com/mailgun/mailgun-go itself.
What are the use cases that you need to be handled with these changes?

@vtopc
Copy link
Contributor

vtopc commented Oct 19, 2024

Closing as abandoned. Feel free to reopen it again.

@vtopc vtopc closed this Oct 19, 2024
@itsdax
Copy link
Author

itsdax commented Oct 25, 2024

Hey sorry for the slow response - it's been a while since I've created this PR.

While I understand this repo is primarily for testing purposes of the repo itself, we've found the test suite quite extendable for generic upstream testing use cases. Specifically, we're using it to create a mock Mailgun server with minimal effort for our integration tests. Let me know if this is convincing enough, or if it's a bit of a stretch to include for this testing suite.

@vtopc vtopc reopened this Oct 25, 2024
Comment on lines +56 to 59
ms.storedMessageHtml[id] = r.FormValue("html")
ms.storedMessageText[id] = r.FormValue("text")

ms.mutex.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be guarded by mutex too

@vtopc
Copy link
Contributor

vtopc commented Nov 28, 2024

Closing as abandoned. Please feel free to reopen it if you need to.

@vtopc vtopc closed this Nov 28, 2024
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