Ptt-official-app / Ptt-backend

PTT APP 的後端
BSD 3-Clause "New" or "Revised" License
208 stars 67 forks source link

feat: Implement mailgun provider #207

Closed SivWatt closed 3 years ago

SivWatt commented 3 years ago

👏 解決掉的 issue / Resolved Issues

📝 相關的 issue / Related Issues

⛏ 變更內容 / Details of Changes

其他

關於 mailgun provider test,我是用自己起一個 https server 的作法去測,這樣 Send 成功以及失敗就都可以被測到。 測試成功的部份有在 handler function 裡面對 request 做一些檢查,如果覺得這個部分不需要,其實也可以拿掉。 另外我新增了 mail_test.go 的想法是覺得 NewMailProvider() 裡面的邏輯 應該是要在這個 test file 裡面驗證。

codecov-commenter commented 3 years ago

Codecov Report

Merging #207 (6c2c208) into development (5111844) will increase coverage by 0.87%. The diff coverage is 81.81%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #207      +/-   ##
===============================================
+ Coverage        45.30%   46.18%   +0.87%     
===============================================
  Files               27       28       +1     
  Lines             1342     1375      +33     
===============================================
+ Hits               608      635      +27     
- Misses             646      649       +3     
- Partials            88       91       +3     
Impacted Files Coverage Δ
internal/mail/mailgun.go 80.64% <80.64%> (ø)
internal/mail/mail.go 58.33% <100.00%> (+8.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5111844...6c2c208. Read the comment docs.

y2468101216 commented 3 years ago

LGTM @PichuChen