Skip to content

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