|
|
@@ -1,4 +1,6 @@
|
|
|
import cn.reghao.devops.manager.ManagerApplication;
|
|
|
+import cn.reghao.devops.manager.notification.service.NotifyService;
|
|
|
+import cn.reghao.devops.manager.notification.service.notifier.ding.DingMsg;
|
|
|
import cn.reghao.devops.manager.rbac.model.constant.RoleType;
|
|
|
import cn.reghao.devops.manager.rbac.model.po.User;
|
|
|
import cn.reghao.devops.manager.rbac.model.po.UserAuthority;
|
|
|
@@ -36,4 +38,16 @@ public class AccountTest {
|
|
|
User user = new User(username, password, Set.of(new UserAuthority(role)));
|
|
|
userService.createUser(user);*/
|
|
|
}
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ NotifyService notifyService;
|
|
|
+ @Test
|
|
|
+ public void notifyTest() throws InterruptedException {
|
|
|
+ String title = "测试";
|
|
|
+ String text = "应用测试内容";
|
|
|
+ DingMsg dingMsg = new DingMsg(title, text);
|
|
|
+ notifyService.notify(dingMsg);
|
|
|
+
|
|
|
+ Thread.sleep(3600_000);
|
|
|
+ }
|
|
|
}
|