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

Add Unit Test for All Notification Package #200

Merged
merged 6 commits into from
Aug 25, 2022
Merged

Conversation

haoel
Copy link
Contributor

@haoel haoel commented Aug 25, 2022

  1. Add Unit Test for all notification package
  2. make the generic Yaml/JSON marshal/unmarshal for all enum type

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2022

Codecov Report

Base: 99.51% // Head: 99.71% // Increases project coverage by +0.20% 🎉

Coverage data is based on head (8aa878d) compared to base (fb8ad1a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   99.51%   99.71%   +0.20%     
==========================================
  Files          49       70      +21     
  Lines        4088     4975     +887     
==========================================
+ Hits         4068     4961     +893     
+ Misses         12        9       -3     
+ Partials        8        5       -3     
Impacted Files Coverage Δ
conf/conf.go 96.27% <100.00%> (+2.50%) ⬆️
conf/log.go 100.00% <100.00%> (ø)
eval/types.go 100.00% <100.00%> (ø)
global/easeprobe.go 100.00% <100.00%> (ø)
global/global.go 100.00% <100.00%> (ø)
notify/aws/sns.go 100.00% <100.00%> (ø)
notify/base/base.go 100.00% <100.00%> (ø)
notify/dingtalk/dingtalk.go 100.00% <100.00%> (ø)
notify/discord/discord.go 100.00% <100.00%> (ø)
notify/lark/lark.go 100.00% <100.00%> (ø)
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

global/easeprobe.go Show resolved Hide resolved
}
// if is syslog, but not configured network, then return false
if strings.TrimSpace(c.Network) == "" || strings.TrimSpace(c.Host) == "" {
return false, nil
return false
Copy link
Contributor

Choose a reason for hiding this comment

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

return strings.TrimSpace(c.Network) != "" && strings.TrimSpace(c.Host) != "" ?

Copy link
Contributor Author

@haoel haoel Aug 25, 2022

Choose a reason for hiding this comment

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

@zhao-kun zhao-kun merged commit f65109d into megaease:main Aug 25, 2022
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.

None yet

3 participants