Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaowei
dlink
Commits
976b5369
Commit
976b5369
authored
Mar 26, 2022
by
zhu-mingye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add wechat webhook alertType
parent
217e146f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
WeChatSenderTest.java
...rc/test/java/com/dlink/alert/wechat/WeChatSenderTest.java
+4
-4
No files found.
dlink-alert/dlink-alert-wechat/src/test/java/com/dlink/alert/wechat/WeChatSenderTest.java
View file @
976b5369
...
@@ -60,9 +60,9 @@ public class WeChatSenderTest {
...
@@ -60,9 +60,9 @@ public class WeChatSenderTest {
@Before
@Before
public
void
initWeChatConfig
()
{
public
void
initWeChatConfig
()
{
// Just for this test, I will delete these configurations before this PR is merged
// Just for this test, I will delete these configurations before this PR is merged
weChatConfig
.
put
(
WeChatConstants
.
AGENT_ID
,
"
1000002
"
);
weChatConfig
.
put
(
WeChatConstants
.
AGENT_ID
,
"
AGENT_ID
"
);
weChatConfig
.
put
(
WeChatConstants
.
SECRET
,
"
V2w-9JDqSrF2wVW0eno6Vnrxbe6WZMHvO1Z1Hwj3JGg
"
);
weChatConfig
.
put
(
WeChatConstants
.
SECRET
,
"
SECRET
"
);
weChatConfig
.
put
(
WeChatConstants
.
CORP_ID
,
"
ww4ae244b25dda07cb
"
);
weChatConfig
.
put
(
WeChatConstants
.
CORP_ID
,
"
CORP_ID
"
);
weChatConfig
.
put
(
WeChatConstants
.
CHARSET
,
"UTF-8"
);
weChatConfig
.
put
(
WeChatConstants
.
CHARSET
,
"UTF-8"
);
weChatConfig
.
put
(
WeChatConstants
.
USER_SEND_MSG
,
"{\"touser\":\"{toUser}\",\"agentid\":{agentId}"
weChatConfig
.
put
(
WeChatConstants
.
USER_SEND_MSG
,
"{\"touser\":\"{toUser}\",\"agentid\":{agentId}"
+
+
...
@@ -93,7 +93,7 @@ public class WeChatSenderTest {
...
@@ -93,7 +93,7 @@ public class WeChatSenderTest {
@Test
@Test
public
void
testChatMarkDownMsg
()
throws
IOException
{
public
void
testChatMarkDownMsg
()
throws
IOException
{
weChatConfig
.
put
(
WeChatConstants
.
WEBHOOK
,
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=8
22d17a1-d6e5-43c2-a566-484
6fe13396c"
);
weChatConfig
.
put
(
WeChatConstants
.
WEBHOOK
,
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=8
xxxxxxxxxxxxxxxxx
6fe13396c"
);
weChatConfig
.
put
(
WeChatConstants
.
SEND_TYPE
,
WeChatType
.
CHAT
.
getValue
());
weChatConfig
.
put
(
WeChatConstants
.
SEND_TYPE
,
WeChatType
.
CHAT
.
getValue
());
weChatConfig
.
put
(
WeChatConstants
.
USER_SEND_MSG
,
WeChatConstants
.
WEBHOOK_TEMPLATE
);
weChatConfig
.
put
(
WeChatConstants
.
USER_SEND_MSG
,
WeChatConstants
.
WEBHOOK_TEMPLATE
);
weChatConfig
.
put
(
WeChatConstants
.
SHOW_TYPE
,
ShowType
.
TABLE
.
getValue
());
weChatConfig
.
put
(
WeChatConstants
.
SHOW_TYPE
,
ShowType
.
TABLE
.
getValue
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment