增加健康检查定时任务/健康检查可以发送消息

This commit is contained in:
GoEdgeLab
2020-10-20 16:45:03 +08:00
parent bf69a60913
commit 0992fcbee5
17 changed files with 555 additions and 20 deletions

View File

@@ -6,12 +6,12 @@ import (
)
func TestSysSettingDAO_UpdateSetting(t *testing.T) {
err := SharedSysSettingDAO.UpdateSetting("hello", []byte(`"world"`))
err := NewSysSettingDAO().UpdateSetting("hello", []byte(`"world"`))
if err != nil {
t.Fatal(err)
}
value, err := SharedSysSettingDAO.ReadSetting("hello")
value, err := NewSysSettingDAO().ReadSetting("hello")
if err != nil {
t.Fatal(err)
}
@@ -19,14 +19,22 @@ func TestSysSettingDAO_UpdateSetting(t *testing.T) {
}
func TestSysSettingDAO_UpdateSetting_Args(t *testing.T) {
err := SharedSysSettingDAO.UpdateSetting("hello %d", []byte(`"world 123"`), 123)
err := NewSysSettingDAO().UpdateSetting("hello %d", []byte(`"world 123"`), 123)
if err != nil {
t.Fatal(err)
}
value, err := SharedSysSettingDAO.ReadSetting("hello %d", 123)
value, err := NewSysSettingDAO().ReadSetting("hello %d", 123)
if err != nil {
t.Fatal(err)
}
t.Log("value:", string(value))
}
func TestSysSettingDAO_CompareInt64Setting(t *testing.T) {
i, err := NewSysSettingDAO().CompareInt64Setting("int64", 1024)
if err != nil {
t.Fatal(err)
}
t.Log("result:", i)
}