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

Notification feature #358

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Notification feature #358

wants to merge 8 commits into from

Conversation

KJ202
Copy link
Collaborator

@KJ202 KJ202 commented Jan 24, 2020

This correponds to the first PR implementing the Notification feature.
We implement here the smtp notification. The SMTP provider should support an API key to allow the feature to work properly (it has been tested with gmail).

The tricky part for me right now is the unit test implementation with our current framework.
To sum up:
I added a new protocol smtp.
Then, I naturally added the send_email function in smtp.go.
The problem is that this function requires API keys. I decided to allow the user to provide them through the config file. This does not seem to match our current model where the config file is mainly used for user sources API keys though. Besides, the testing framework provides a setupconfig function which is also only accessible in the services package.

So, right now, the quickest solution to start implemeting my tests would be to import the services package in my smtp_test.go file. if you agree, I'll start to work on it this way.
Otherwise, I'm open to any suggestion to get a better solution.

PS: This PR is still work in progress. I still need to handle 2 more cases and finish the tests to be able to set it as Ready.

@KJ202 KJ202 marked this pull request as ready for review February 3, 2020 08:35
Copy link
Collaborator

@caffix caffix left a comment

Choose a reason for hiding this comment

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

Let's continue the implementation that includes the other methods of notification

@caffix caffix changed the title Notification feature: Implementation of the gmail notification feature Notification feature Feb 16, 2020
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