mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-20 13:00:24 +08:00
实现基本的监控图表
This commit is contained in:
21
internal/db/models/node_value_dao_test.go
Normal file
21
internal/db/models/node_value_dao_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/iwind/TeaGo/bootstrap"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestNodeValueDAO_CreateValue(t *testing.T) {
|
||||
dao := NewNodeValueDAO()
|
||||
m := maps.Map{
|
||||
"hello": "world12344",
|
||||
}
|
||||
err := dao.CreateValue(nil, NodeRoleNode, 1, "test", m.AsJSON(), time.Now().Unix())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("ok")
|
||||
}
|
||||
Reference in New Issue
Block a user